@a_musingcat aww, it's the complex ones that make my brain hurt too! if you're not doing 3 levels of aggregation & nested subqueries are you even really writing sql?