

Writing Analytics SQL with Common Table Expressions - chubot
http://research.neustar.biz/2014/05/19/writing-analytics-sql-with-common-table-expressions/

======
groovy2shoes
Some RDBMSs support recursive CTEs, which come in handy sometimes. SQLite
added support earlier this year, and I've written a handful of recursive CTEs
to traverse DAGs in the database. I was blown away by how quickly SQLite can
handle queries like that!

~~~
batbomb
A few others: SQLite, Oracle, PostgreSQL, DB2, HSQLDB.

~~~
yangyang
And SQL Server.

~~~
collyw
Everything except MySQL?

------
benilov
DbFit ([http://dbfit.github.io/dbfit/](http://dbfit.github.io/dbfit/))
provides a more heavy-weight, but much more scalable alternative to raw SQL
for testing CTEs.

------
j_s
In SQL Server, CTEs eventually slow down then temp tables win because they can
have indexes.

