automated commit by check50 [check50=True]
This commit is contained in:
24
12.sql
24
12.sql
@@ -12,12 +12,22 @@
|
||||
-- FROM "table"
|
||||
-- );
|
||||
|
||||
SELECT d."name", e."per_pupil_expenditure", g."graduated"
|
||||
FROM "schools" AS s
|
||||
JOIN "districts" AS d
|
||||
ON s."district_id" = d."id"
|
||||
SELECT
|
||||
d."name",
|
||||
e."per_pupil_expenditure",
|
||||
s."exemplary"
|
||||
FROM "districts" AS d
|
||||
JOIN "expenditures" AS e
|
||||
ON d."id" = e."district_id"
|
||||
JOIN "graduation_rates" AS g
|
||||
ON s."id" = g."school_id"
|
||||
ORDER BY e."per_pupil_expenditure" DESC, s."name" ASC;
|
||||
JOIN "staff_evaluations" AS s
|
||||
ON d."id" = s."district_id"
|
||||
WHERE d."type" = 'Public School'
|
||||
AND e."per_pupil_expenditure" > (
|
||||
SELECT AVG("per_pupil_expenditure")
|
||||
FROM "expenditures"
|
||||
)
|
||||
AND s."exemplary" > (
|
||||
SELECT AVG("exemplary")
|
||||
FROM "staff_evaluations"
|
||||
)
|
||||
ORDER BY s."exemplary" DESC, e."per_pupil_expenditure" DESC;
|
||||
|
||||
Reference in New Issue
Block a user