I am going insane over the 3.sql Query concerning the “Dese” Problem in Problem Set 1 of CS50 SQL.
Problem:
The Massachusetts Legislature would like to learn how much money, on average, districts spent per-pupil last year. In 3.sql, write a SQL query to find the average per-pupil expenditure. Name the column “Average District Per-Pupil Expenditure”.
Note the per_pupil_expenditure column in the expenditures table contains the average amount, per pupil, each district spent last year. You’ve been asked to find the average of this set of averages, weighting all districts equally regardless of their size.
My Query:
SELECT AVG(per_pupil_expenditure) AS “Average District Per-Pupil Expenditure” FROM expenditures;
CS50 Check:
🙁 3.sql produces correct result
expected “19528.99002525…”, not “19528.99002525…”
I looked for the correct solution on youtube and other github depositories, but they all look the same to mine.
I can not find out what is wrong with my query. Did anyone else run into the same problem?
user25729861 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.