- The Query
- Posts
- 🤓 A method for finding duplicates in SQL
🤓 A method for finding duplicates in SQL
Good morning fellow data cruncher!
The Query here. 👋
Here’s what we have for you today:
A method for finding duplicates in SQL 📊
A real SQL mock interview 👨💻
New data analyst jobs 💼
A dose of hilarity 🤣
select * from data-jobs
remote, data jobs
Open to exploring new job opportunities?
We cultivate the best data analyst jobs from around the internet to make your search easier.
Check out this week’s featured jobs here.
Data Analyst @ Scan.com — $120-130k per year
Data Analyst @ Capital Project Intelligence — $70-100k per year
Senior Marketing Analyst @ Wowza — $140-165k per year
freelance gigs
Need work experience? Get real experience with real projects.
Analyst to help with surveys — $18-35 per hour (apply here)
Tableau help — $15-25 per hour (apply here)
Data Analyst — $15-20 per hour (apply here)
def content_spotlight(🔦):
Are you scratching your head, thinking, "Am I really ready for that SQL job?"
Well don't sweat it, my friend! Braintree's got your back.
They've shared their very own SQL interview right on GitHub.
Give it a go and test your skills!
Doing a few coding challenges like these before your interview can help calm your nerves and improve confidence going in.
Remember, if you don’t know how to do something don’t just give up and act embarrassed. Talk through your thought process and many times the interviewer will give you a little nudge in the right direction.
Good luck!
class SQLMiniLesson:
Checking for Duplicates in SQL
Kyle here 👋 — You'll be checking for duplicates in SQL like a gazillion times throughout your data journey.
When I refer to a duplicate I just mean any columns that’s repeated more than once that you didn’t want to be.
This can happen for a lot of reasons (e.g. error uploading the data, misused left join, etc.)
Wanna know the easiest way to hunt for duplicates?
Here ya go:
This method uses GROUP BY and HAVING together to accomplish our goal.
If there are any duplicate values for “column_name” they’ll be returned along with the count of those values.
(Heads up: If the count is more than 1, you've got yourself a duplicate! 🎯)
There are other ways to sniff out duplicates, but this is the method I use most often.
Hope this helps!
import memes as 😂
content & resources 🤓
1. Become a Data Analyst Guide: Our full guide on what it takes to land a job as a data analyst.
2. Open Data Analyst Jobs: Find your next data job here!
3. Download our SQL Cheatsheet as a PDF and desktop wallpaper here.
That’s it for today.
Stay crunchin’ folks and see you next week!
— Kyle & Cody
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
What'd you think of today's newsletter? |