SQL for fun and profit @aarondfrancis
SQL for fun and profit  @aarondfrancis
Uploaded July 2024 | Updated September 2026, 1 hour ago
Want to learn more SQLite? Check out the full course: https://highperformancesqlite.com.

Recursive CTEs (common table expressions) are really powerful, and actually useful! In this video, I demonstrate how to use a recursive CTE in SQLite to identify a missing order from an orders table, showcasing a practical solution to a common business problem. This technique is not only powerful for maintaining data integrity but also impressively versatile for various scenarios, such as filling gaps in sequences like dates or numbers.

Get your free SQLite reference guide: highperformancesqlite.com/products/sqlite-reference-guide

Follow Aaron:
Twitter: twitter.com/aarondfrancis
LinkedIn: linkedin.com/in/aarondfrancis
Website: aaronfrancis.com - find articles, podcasts, courses, and more.

Check out the article version of this video: aaronfrancis.com/2024/finding-missing-orders-with-a-recursive-cte-bf59e6de

Chapters:
00:00 Recursive CTE in SQLite
00:31 Orders Table Set-Up
01:55 Find Missing Order using Recursive CTE
05:40 When to Use Recursive CTE
SQL for fun and profitSQLite is not weakly typed!Laravel tip: Higher order collection proxies (and Zevia)Welcome to Token TownAre designers cooked?The Music Makers Podcast - 002 - What Have You Tried?Using a browser agent on the worst government websiteThe Music Makers Podcast - 032 - No Time For Something Important? Try Waking Up Earlier.Vectors in SQLite! (with libSQL)The Music Makers Podcast - 025 - A Little Bit of Slope Makes Up For a Lot of Y-InterceptI made $10,000 from a vibecoded appCode tip: Dont undo what you havent done
Aaron Francis |

SQL for fun and profit

SHARE TO X SHARE TO REDDIT SHARE TO FACEBOOK WALLPAPER