automated commit by check50 [check50=True]
This commit is contained in:
12
11.sql
12
11.sql
@@ -0,0 +1,12 @@
|
||||
-- write a SQL query to display the names of schools, their per-pupil expenditure, and their graduation rate.
|
||||
-- Sort the schools from greatest per-pupil expenditure to least.
|
||||
-- If two schools have the same per-pupil expenditure, sort by school name.
|
||||
--
|
||||
-- You should assume a school spends the same amount per-pupil their district as a whole spends.
|
||||
SELECT d."name", e."per_pupil_expenditure", g."graduated"
|
||||
FROM "expenditures" AS e
|
||||
JOIN "districts" AS d
|
||||
ON e."district_id" = d."id"
|
||||
JOIN "graduation_rates" AS g
|
||||
ON d."id" = g."id"
|
||||
ORDER BY e."per_pupil_expenditure" DESC, d."name" ASC;
|
||||
|
||||
Reference in New Issue
Block a user