I needed a refresher to my SQL knowledge and this