6. Daily revenue in June, 2020 easy

Instruction

  • Write a query to return daily revenue in June, 2020.
  • Use DATE(colname) to extract the date from a timestamp column.
  • No dates need to be included if there was no revenue on that day.

Table 1: payment

Movie rental payment transactions table

   col_name   | col_type
--------------+--------------------------
 payment_id   | integer
 customer_id  | smallint
 staff_id     | smallint
 rental_id    | integer
 amount       | numeric
 payment_ts   | timestamp with time zone

  

Sample results

     dt     |   sum
------------+---------
 2020-06-14 |   57.84
 2020-06-15 | 1376.52

Login for solution