Ravindra BagaleCourses & study guides Track your progress

Date and Time Queries for Analysts — Ravi Sir's Cards

All SQL cards

Revision cards

Date ranges the safe way. Monthly reports must include every row from the last day of the month, even the late evening ones.
Date ranges the safe way · PNG

Interview cards

Why is BETWEEN risky for date ranges? SQLite compares the dates as text, and '2026-09-30 15:30:00' sorts after '2026-09-30'. So BETWEEN with a bare end date leaves out every row on the last day that h
Why is BETWEEN risky for date ranges? · PNG

Comparison cards

strftime() vs julianday(). strftime() takes a part out of a date, such as the year or month. julianday() turns a date into a day number.
strftime() vs julianday() · PNG