Where are some useful SQL puzzles to teach SQL in a workplace?

Joe Celko's books and newsgroup posts are a good source of puzzles (with a variety of answers). They might be a bit more intermediate/advanced and not MySQL-specific, but are easy to follow and generally come from practical real-world situations.

Particularly, hunt down a copy of Joe Celko's SQL Puzzles and Answers (link to Google preview), it's a compilation of some of the best.

The SQLTeam forums occasionally have some interesting problems too, but generally focused on MS SQL Server.

The HackerRank SQL domain has a variety of SQL challenges that can be completed using multiple implementations (e.g.: Oracle, MySql, MS SQL Server, DB2).


There are lots of interesting puzzles and contests in BeyondRelational.Com

TSQL Challenges
TSQL Beginners Challenge


SQL Server Central has some quizzes here:

http://www.sqlservercentral.com/tags/T-SQL/SQL+Puzzles/

There's also SQL Quiz, which is more like quiz questions rather than puzzles:

http://www.sqlquiz.com/

And Lessthandot has some general programmer puzzles:

http://forum.lessthandot.com/viewforum.php?f=102

Tags:

Learning