Table schema:
Reader_id
Date
Minutes_read
Book_id
I want to extract the month from a date ‘2021-07-15’ to sum the total time spent reading books in summer months (06-08) for each reader.
So my final table would something like
Reader_id | summer_reading_time
If your data spans multiple years, you cannot simply extract a time range. Consider
EXTRACT():