automated commit by check50 [check50=True]
This commit is contained in:
1 parent
347ed3063f
commit
18ad4e495a
2 files changed
+3
-2
No files matched your search
@@ -1,2 +1,2 @@
|
|||||||
-- write a SQL query to find the names and cities of all public schools in Massachusetts.
|
-- write a SQL query to find the names and cities of all public schools in Massachusetts.
|
||||||
SELECT "name", "city" FROM "schools" WHERE type = "Public School";
|
SELECT "name", "city" FROM "schools" WHERE "type" = "Public School";
|
||||||
@@ -4,6 +4,7 @@
|
|||||||
-- order them alphabetically.
|
-- order them alphabetically.
|
||||||
SELECT "city", COUNT("name") AS "Number of schools"
|
SELECT "city", COUNT("name") AS "Number of schools"
|
||||||
FROM "schools"
|
FROM "schools"
|
||||||
|
WHERE "type" = "Public School"
|
||||||
GROUP BY "city"
|
GROUP BY "city"
|
||||||
ORDER BY "Number of schools" DESC, "name" DESC
|
ORDER BY "Number of schools" DESC, "name" ASC
|
||||||
LIMIT 10;
|
LIMIT 10;
|
||||||
Reference in new issue
Block a user