Skip to content
Advertisement

SQL average money spent per day

I would like to get some help in writing SQL query for the table below. The table represents how much students spent at a food court on a given date. With this table, write an SQL query that calculates the number of days between the first and last date of money spent by each student and the money spent per day in this timespan.

Advertisement

Answer

Try this

User contributions licensed under: CC BY-SA
4 People found this is helpful
Advertisement