· SQL · 2 min read

SQL Lesson 9: Working With Dates

Filter and group by dates in SQL: ISO date format, month and year ranges, strftime/date functions in SQLite (and SQL Server/PostgreSQL equivalents), adding days, date differences and Indian FY quarters.

Read article →

· SQL · 3 min read

SQL Lesson 7: Subqueries

Use a query inside a query: compare with an average, filter with IN and NOT IN, find the row with the maximum, query a summary in FROM, and know when a JOIN or CTE is clearer.

Read article →

· SQL · 2 min read

SQL Lesson 5: GROUP BY and HAVING

Get totals per group with GROUP BY — customers per region, orders per status, sales per month — filter groups with HAVING, and know the difference between WHERE and HAVING.

Read article →

· SQL · 2 min read

SQL Lesson 3: ORDER BY and LIMIT

Sort SQL results with ORDER BY, ascending and descending, by several columns and by calculated values; get top-N lists with LIMIT, and understand why unsorted results have no guaranteed order.

Read article →