Click here to monitor SSC

Lionel Clarke

Lionel Clarke

SQL Puzzle 9


/*Happy New Year everybody! To help with the January blues, I thought it was time for another puzzle. The inspiration for this one comes from a SQL question posed by my girlfriend. She is a geologist and, on a recent field trip to Iceland, was wandering around with a GPS strapped to her head to […]

7 January 2008 11:56 am by
Lionel Clarke

SQL Puzzle 8


/*So I thought it was just about time for another puzzle but I was having great difficulty in coming up with a new challenge.  Luckily Andras has posted a blog entry about how thePOWERSUM function has been removed from SQL Server. puzzle is a nice simple one and is to write a single select statement […]

27 November 2007 1:12 pm by
Lionel Clarke

SQL Puzzle 7


/*Well, it has been a while since I posted up a puzzle. I  blame this on the very unflattering picture of myself attached to the blog. This causes me a natural reluctance to put it in a position where people might see it! It is that and …ahem… the cat ate my homework …ahem… blog entry. […]

26 October 2007 4:53 am by
Lionel Clarke

Sql Puzzle 6

1 comment

/* Just because I can’t take another day of hassle for not posting up another puzzle here is a world cup themed one.  This puzzle is by a friend of mine called Tom Sillence. 1) The first puzzle is to produce the group tables as seen on this page: we want a table with the […]

28 June 2006 10:25 pm by
Lionel Clarke

Sql Puzzle 5


/*I hope that everybody had a good Christmas. I apologize for the lack of new puzzles but I have been using up the remains of my Holiday. Since it is the New Year I thought we should start it off with a nice easy but fun puzzle.Recently I have been struggling writing some internal Red […]

30 December 2005 5:27 pm by
Lionel Clarke

A Sql Game


There seems to be computer game written in almost every language out there but I haven’t yet found one written in Transact SQL. I thought that poor old DBAs should have some form of game to play so I have written a little 3D maze game in Transact SQL. Since there is no obvious way […]

30 December 2005 5:23 pm by
Lionel Clarke

Sql Puzzle 4


/*Sorry for the delay putting up this puzzle but I was going to post a different puzzle for this week but failed to get a solution for it When queuing for our food at the Christmas party, I noticed that several of ushad already overdone the alcoholic drinks. Whilst we waited, I wondered howmany drunk […]

16 December 2005 11:35 am by
Lionel Clarke

Sql Puzzle 3


/* This puzzle is simple. Given the table below you have to output the words of the famous Christmas carol using a single select statement. Each line must be a separate row of the results set. I am also adding the restriction that you can not use a union statement. This is to stop cheating […]

22 November 2005 3:50 pm by
Lionel Clarke

Sql Puzzle 2


/*Todays puzzle comes from Andras who incudentally got the best solution so far to the last puzzle.We have two tables a letters table and a numbers table. The letters tableis a letter followed by three numbers. The idea is to write a query that returns all the letters that have all numbers listed in the […]

4 November 2005 4:46 pm by
Lionel Clarke

A Sql Puzzle for you all


/*To try and help everyone get a little better at sql I am setting a little puzzle for you all to do based on a problem that Richard had with the check for updates site. The puzzle is simple. We have a version table that holds all the version of all our products that we […]

28 October 2005 2:10 pm by

Blog archive