
In this demo, we'll be moving beyond the Big 6 clauses (SELECT, FROM, WHERE, GROUP BY, HAVING, ORDER BY) and introduce more advanced SQL querying topics.
Our goal will be to first generate a series of dates using a recursive CTE, combine it with a sales table using a LEFT JOIN, and finally fill in the missing NULL values using the COALESCE null function and the LAG & LEAD window functions.
Along the way, we'll be covering 12 advanced SQL concepts:
UNION
UNION ALL
Subqueries
LEFT JOIN
INNER JOIN
CTEs
Recursive CTEs
Date Expressions
CAST
COALESCE
ROUND
Window Functions
… all in less than 20 minutes!

Alice Zhao
Lead Data Science Instructor
Alice Zhao is a seasoned data scientist and author of the book, SQL Pocket Guide, 4th Edition (O'Reilly). She has taught numerous courses in Python, SQL, and R as a data science instructor at Maven Analytics and Metis, and as a co-founder of Best Fit Analytics.