automated commit by check50 [check50=True]
This commit is contained in:
2
1.sql
2
1.sql
@@ -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";
|
||||||
|
|||||||
3
4.sql
3
4.sql
@@ -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