Code for my blog post Data-all-the-Query