NonplayerCharacter

PGexercises.com | Bookings by month

Mar 22nd, 2022 (edited)
1,628
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. -- https://pgexercises.com/questions/date/bookingspermonth.html
  2. -- again, date_trunc works, date_part does not
  3. -- not surprisingly, as they solve different problems
  4.  
  5. select date_trunc('month',starttime) as month,
  6. count(starttime)
  7. from cd.bookings
  8. group by 1
  9. order by 1 asc
Advertisement
Add Comment
Please, Sign In to add comment