Data Science SQL Interview Question Walkthrough (real interview style) | SQL Sundays #8

preview_player
Показать описание
Hi friends! Welcome back to SQL Sundays! A weekly SQL data science interview questions and answers walkthrough.

This is another data science SQL interview question and answer done from beginning to end in a real interview style.

🔗Affiliates
========================
My SQL for data science interviews course (10 full interviews):

365 Data Science:

Check out StrataScratch for data science interview prep:

📲Socials
========================

🤯Study with Tina
========================
Study with Tina channel:

How to make a studying scoreboard:

Scoreboard website:

livestreaming google calendar:

🎥Other videos you might be interested in
========================
SQL Sundays Playlist:

How I consistently study with a full-time job:

How I would learn to code (if I could start over):

🐈‍⬛🐈‍⬛About me
========================
Hi, my name is Tina and I'm a data scientist at a FAANG company. I was pre-med studying pharmacology at the University of Toronto until I finally accepted that I would make a terrible doctor. I didn't know what to do with myself so I worked for a year as a research assistant for a bioinformatics lab where I learned how to code and became interested in data science. I then did a masters in computer science (MCIT) at the University of Pennsylvania before ending up at my current job in tech :)

📧Contact
========================
youtube: youtube comments are by far the best way to get a response from me!

========================
Some links are affiliate links and I may receive a small portion of the sales price at no cost to you. I really appreciate your support in helping improve this channel! :)

Music Credit:
TheFatRat & Laura Brehm - We'll Meet Again
Рекомендации по теме
Комментарии
Автор

Thanks Tina for another awesome SQL lesson 😊

DataProfessor
Автор

Have been binge watching all the SQL Sundays now in preparation of interviews! Thanks for all the content!

ayushmore
Автор

This playlist is the reason I subscribed. Please do more. Excellent format.

BABartz
Автор

Thank you so much Tina. I have watched all sql videos and have learnt a lot, esp learn about how to prepare a question before writing the queries. Thxxxx

zihonghuang
Автор

hey, Thank you so much for this awesome SQL playlist, please do more

kaoutarbentalha
Автор

Thanks Tina! Really loved this series, can you do more again?

bballlover
Автор

Thanks Tina I finished learning all these 8 questions, thinking about purchasing the Stratascratch membership. I will succeed in the tech interviews!

dehan
Автор

Hi Tina, thanks for your walkthrough, and here's my soln about the ntile. Correct me if it's wrong because I just start to break into the data science field. Thanks :)

select
from_user,
count(*) as total_email,
percent_rank() over (order by count(*) desc) as ntile
from google_gmail_emails
group by 1

Also, would love to hear your opinions on what do you think about the difference between CTE and subquery in terms of efficiency? And what are the optimization tips would you say in writing something like hundred lines of SQL code?

danielw
Автор

Hi, great video, thanks for sharing! I'm just left wondering how are you able to use an aggregate function with a window function in the same select? I thought that should not be possible

thevoiceofb
Автор

Please upload videos on SQL Sunday interview questions! Thanks for the content... Happy Learning!

prathameshbane
Автор

SQL wednesdays :) Thanks Tina. As usual, very helpful video. I wouldn't mind if you placed an ad or two. Not skipping ads might be the only way for me to support you and your channel right now aside from watching, liking and sharing your vids.

jariuslouie
Автор

Thanks so much Tina for preparing this AWESOME series of SQL interview questions! Wondering if you have any plans of posting similar interview prep series for Python in the future?

siyangzhou
Автор

just learned group by 1 from you nice solution

shanefan
Автор

The answer provided by StrataScratch is fishy because it uses NTILE(100). It already assumes that there are only 100 records in the table, and it tries to divide these 100 records into 100 groups so that every record has its own ranking number. AND thanks Tina for letting me know rank functions are also called window function!

ericzheng
Автор

Tina plz make more videos on sql plz your videos are really helpful.🙏🙏🙏🙏

agrim
Автор

Thanks for sharing. Question on the solution Ntile(100), there is a chance to assign the same percentile to the same number of emails? say there are 101 rows and the 1st two rows have the same number of email.

xuzhang
Автор

Awesome!! I liked your approach better.
When you do group by 1, is that grouping by the user ? (I’m still learning SQL haha)

로그-vi
Автор

subscribed to stratascratch through your link!

shanminlin
Автор

Dw, imma save this to my playlist so that I can watch this Sunday to maintain the Sequel Sunday regime😉

drraxinarc
Автор

A SQL newbie here.. Can anyone help me where I can find such questions for practice??🙄

meanrambler