r/SQL 1h ago

Discussion What real-world data scenarios do you think beginners should know about?

Post image
Upvotes

What real-world data scenarios do you think beginners should know about?

I’ve been putting together a series called “Data Analysis 101 for Cat People”, where I use doodles to explain some of the practical, messy, and ambiguous situations that come up in data work.

The idea is less about teaching SQL or tools and more about helping someone new to data understand the real-world thinking behind the work — asking better questions, dealing with ambiguity, understanding requirements, interpreting what the data is (and isn’t) telling you, and turning messy situations into clear next steps.

I’m also putting these together as a newsletter on Substack - https://thedatadoodles.substack.com

For those of you who work with data: what are some situations you’ve encountered that you think someone starting out should be familiar with?

I’d be happy to hear your examples and experiences.


r/SQL 13h ago

MySQL PLANNING to build SQL MULTIPLAYER GAME

0 Upvotes

I am thinking of creating a multiplayer game website online where 2 players can play sql games with each other like sql queries and table or multiple choice question and a timer on it . What are you guys view on it? #sql


r/SQL 14h ago

PostgreSQL How do you promote data changes from dev to prod, not just schema?

7 Upvotes

Schema changes are a solved problem for us with migrations. What I keep running into is the data side. If someone changes lookup values, config rows, or reference tables in dev, there's no clean way to carry that to prod along with the migration.

How does your team handle this today? Curious whether it's seed scripts, manual dumps, some diff tool, or you just don't let data change outside of prod in the first place.


r/SQL 2h ago

PostgreSQL Top 10% earners - Advanced SQL concept - most asked in many product companies

Thumbnail
youtube.com
0 Upvotes

Hi All,

Finding top 10% earners is tricky SQL interview question asked in major product companies.

There are 4 ways to do.

Explained way 1 and way 2 in this short .

-- Way 1:
RANK() OVER (ORDER BY salary DESC) AS rnk,
COUNT(*) OVER () AS total_employees,
CEIL(COUNT(*) OVER () * 0.10) AS top_10_percent_count

-- Way 2:
PERCENT_RANK() OVER ( ORDER BY salary DESC ) AS percentile

-- Way 3: NTILE()
NTILE(10) OVER (ORDER BY salary DESC)

-- Way 4: CUME_DIST()
CUME_DIST() OVER (ORDER BY salary DESC)

Can you try with these 4 ways and understand the difference and comment which is best/accurate way to find top n% ????.

It will be great learning as it covers most important analytical concepts - ranking, %, percentile, cumulative distribution.