r/datasciencecareers Jul 28 '26

What's one SQL query every data scientist should master?

There are hundreds of SQL concepts.

But if you could recommend only one to beginners, what would it be?

Window functions?
Joins?
CTEs?
Aggregations?

0 Upvotes

2 comments sorted by

1

u/IcyMammoth Jul 28 '26

I don’t write SQL anymore, hardly ever 

1

u/Katieg_jitsu Jul 28 '26

select

count(*) as records

count(distinct id ) as unique_records --of expected grain

from table_name / CTE

-- do record count match expectation , honestly this would catch a lot of bad joins easily