Subquery functionality for Group By queries

Ok, I believe I've addressed all the items in the review. Please take another look. Thanks!