Deals Of The Week - hours only!Up to 80% off on all courses and bundles.-Close
Introduction
Get to know the database
Summary
16. Summary

Instruction

Perfect! That's it for this part of the course. Let's have a short summary before we continue.

  1. To find rows for three months starting from March 20, 2017, use:
    SELECT ... FROM ...
    WHERE column_name >= '2017-03-20' AND column_name < CAST('2017-03-20' AS DATE) + INTERVAL '3' month
  2. To find rows for the current month, use:
    SELECT ... FROM ...
    WHERE column_name >= CAST(EXTRACT(year FROM CURRENT_TIMESTAMP) || '-' || EXTRACT(month FROM CURRENT_TIMESTAMP) || '-01' AS DATE)
    or use your database's built-in function if there is one:
    SELECT ... FROM ...
    WHERE column_name >= DATE_TRUNC('month', CURRENT_TIMESTAMP)

Okay, let's do a very short quiz before we conclude this part.

Exercise

Click Next exercise to continue.