diff --git a/7.sql b/7.sql index 4836dd3..c12b367 100644 --- a/7.sql +++ b/7.sql @@ -1,4 +1,8 @@ -- write a SQL query to find the names of schools (public or charter!) in the Cambridge school district. -- Keep in mind that Cambridge, the city, contains a few school districts, but DESE is interested in the -- district whose name is “Cambridge.” -SELECT "name" FROM "schools" WHERE "city" = "Cambridge"; +SELECT s."name" +FROM "schools" AS s +JOIN "districts" AS d + ON s."district_id" = d."id" +WHERE d."name" = 'Cambridge';