SQL Tips
Conditionals can be used inside SUM() with group by aggregations
Use inverse
Instead of finding something using a complex query, use a subquery that does the opposite of the primary problem. Then use the outer query to find "not in subquery".
Reduce duplicate rows cross-join
Interview Questions
Last updated