Category Archives: Databases

Bruce Momjian: Programming the SQL Way with Common Table Expressions

In this talk from Postgres Open 2013, Bruce Momjian introduces the idea of “Common Table Expressions” (aka “CTEs”), which allow you to accomplish a great deal of programming power within a single (if complex) SQL query. If you work with PostgreSQL, then you really should learn about CTEs, and this talk is one way to do it. Slides for this talk are at http://momjian.us/main/writings/pgsql/cte.pdf.