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!