26. List of Dates

This advanced SQL exercise is part of the book: Advanced SQL – Practical Techniques and Use-Cases, which includes 100 day-to-day SQL challenges (and solutions), need-to-know advanced features, and key concepts.

Create a query that displays all dates for the year 2015.
For each day of the year 2015, the query will display an indication (0 or 1), specifying whether it is:

  • Beginning of the week
  • Weekend
  • Beginning of the quarter
  • End of the quarter
  • Beginning of the month
  • End of the month

To read more

UpScale Analytics is one of the largest platforms in the world for learning SQL by doing, consisting over 300 SQL exercises at different levels (including solutions), by topics, across over 100 different datasets. More…