Mark Cowne explains his solution to TSQL Challenge 14