From 50306459f4d8ff432529d1c886cce6423bb9e193 Mon Sep 17 00:00:00 2001 From: daviddoji Date: Mon, 27 Apr 2026 17:15:28 +0200 Subject: [PATCH] automated commit by check50 [check50=True] --- 11.sql | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/11.sql b/11.sql index 013be17..af4f093 100644 --- a/11.sql +++ b/11.sql @@ -3,10 +3,12 @@ -- 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 +SELECT s."name", e."per_pupil_expenditure", g."graduated" +FROM "schools" AS s JOIN "districts" AS d -ON e."district_id" = d."id" + ON s."district_id" = d."id" +JOIN "expenditures" AS e + ON d."id" = e."district_id" JOIN "graduation_rates" AS g -ON d."id" = g."id" + ON s."id" = g."school_id" ORDER BY e."per_pupil_expenditure" DESC, d."name" ASC;