SQL is traditionally one-dimensional in that you can access values in a row, in the horizontal dimension. SQL Server 2012's support of LAG and LEAD and other so-called window functions open up the vertical dimension, giving access to all values in a column.
One aspect of SQL that I've long enjoyed is the possibility of taking a feature of the language that doesn't seem to bear on the problem at hand, and applying that feature in some clever way to solve the problem. Here is a fun application of the technique I wrote about last year in Finding Flight Legs.
Pivot tables are incredibly useful when writing certain types of SQL queries, because they let you generate rows that do not otherwise exist. Here are several ways to create them. (There is also a CONNECT BY approach that is well-known on the Internet, but that I have never gone back and added to this article).
A few days ago, I wrote Does PL/SQL Implicitly Close Cursors in response to reader question about whether PL/SQL would implicitly close any open cursors at the end of a block. That same reader recently sent me a snippet of code that has caused me to rethink my position.