1.
http://sqlperformance.com/2013/01/t-sql-queries/generate-a-set-1
2.
http://sqlperformance.com/2013/01/t-sql-queries/generate-a-set-2
3.
http://sqlperformance.com/2013/01/t-sql-queries/generate-a-set-3