Member-only story
If You Know These 7 SQL Queries, You Can Solve Most SQL Problems
These 7 patterns are all you need to know
There are two types of people studying SQL.
The first type is people who find SQL tricky.
They understand the logic, but when it comes to solving a problem, they’re not able to come up with the query on their own.
The second type is the ones who can solve most SQL problems on their own.
But when they move on to studying different subjects, their momentum breaks, and they have to spend time in rebuilding logic.
And honestly, both of these cases can be frustrating.
What I have realized is that SQL becomes much easier when you focus on patterns rather than syntax.
And I have observed that there are these 7 specific query patterns that keep repeating.
So let’s quickly go through one pattern at a time and make sure you never feel confused when solving SQL problems.
1. SELECT + WHERE
Find exactly what you need
Suppose you have a million records in your customers table. But at the moment, you’re only interested in looking at the customers from Australia.









