Problems with complicated SQL query results and one solution which solves them all
netguru.co