automated commit by check50 [check50=True]

This commit is contained in:
daviddoji
2026-04-27 17:35:06 +02:00
parent 409a38308d
commit 149b9da6df

24
12.sql
View File

@@ -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;