Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion questions/date/00090000-bookingspermonth.ex
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ Return a count of bookings for each month
|QUESTION|
Return a count of bookings for each month, sorted by month
|QUERY|
select date_trunc('month', starttime) as month, count(*)
select date_trunc('month', starttime) as month,
sum(slots)
from cd.bookings
group by month
order by month
Expand Down