Master Subqueries and CTEs: Advanced SQL for Complex Analytics | Wicked Smart Data