Google SQL Interview Question | Step By Step Solution
HTML-код
- Опубликовано: 20 окт 2024
- In this video, we are going to solve SQL questions asked on Google for Data Analyst, Data Engineer, and Data Science positions.
Practice more questions here (Interview Query) - bit.ly/3w41nCJ
Join Data With Darshil Discord Server: / discord
👦🏻 My Linkedin - / darshil-parmar
📷 Instagram - / darshilparmarr
🎯Twitter - / parmardarshil07
🌟 Please leave a LIKE ❤️ and SUBSCRIBE for more AMAZING content! 🌟
3 Books You Should Read
📈Principles: Life and Work: amzn.to/3HQJDyP
👀Deep Work: amzn.to/3IParkk
💼Rework: amzn.to/3HW981O
Tech I use every day
💻MacBook Pro M1: amzn.to/3CiFVwC
📺LG 22 Inch Monitor: amzn.to/3zk0Dts
🎥Sony ZV1: amzn.to/3hRpSMJ
🎙Maono AU-A04: amzn.to/3Bnu53n
⽴Tripod Stand: amzn.to/3tA7hu7
🔅Osaka Ring Light and Stand: amzn.to/3MtLAEG
🎧Sony WH-1000XM4 Headphone: amzn.to/3sM4sXS
🖱Zebronics Zeb-War Keyboard and Mouse: amzn.to/3zeF1yq
💺CELLBELL C104 Office Chair: amzn.to/3IRpiL2
👉Data Engineering Complete Roadmap: • Data Engineer Complete...
👉Data Engineering Project Series: • Data Engineering Proje...
👉Become Full-Time Freelancer: • Best Freelancer Series...
👉Data With Darshil Podcast: • Podcast Series - Data ...
✨ Tags ✨
google interview question, google SQL interview, how to prepare for data science interview, data engineer interview question, data analyst SQL question
✨ Hashtags ✨
#faang #inteview #sql
If you want more videos like this then let me know and don't forget to hit that LIKE button :D
Yes, keep up the good work!!!
Darshil … good video content and great explanation….I have a question….Is the syntax you typed for sql server OR Oracle DB???
It's so easier to learn SQL from your video the way you explain step wise.
In other videos, people try to solve question themselve but you try to solve exactly like how someone learning sql would do. Highly appreciated.
Create this type of SQL interview ques video more👍
I’ll work on these videos
Please create a complete playlist for all top most SQL Interview questions generally asked in most of product based, this video is very helpful 😊
Yes I’ll try my best to create this
@@DarshilParmar Yes, please create playlist of sql questions, that will be unique, i am not finding any such playlist on YT
Hi. I think dense_rank() should be used instead of rank(). Rank() function skips the rank when there are duplicate values.
So assuming if engineering department has the salary as 8000, 8000, 8000, 7000, 6000, 5000.
The rank function will only give the employee output as 8000,8000,8000 (For the top 3 salaries).
Whereas dense_rank will give the employee info output for the salary of 8000, 7000,6000. (Total 5 Rows of output)
Logic does look correct but question says top 3 employee salary to be returned, if top 3 employee salary has 8000 and those should be printed because 7000, 6000 does not come
If question said print top 3 different salary for each department then we can use this and get distinct value for top 3 different
@@DarshilParmar I read the question again, and here is my thought on that:
Question is not clear. It doesn't specify if the duplicate should be allowed. So if we generalize it to a real life scenario on school ranking... then each student who gets the same marks are assigned with the same rank.
But I do get your point as your query passed all the test cases and your assumption worked in this question.
It was nice connecting to you.
Thanks!
@DarshilParmar, for the case that you mentioned where top 3 salaries has same salary of 8000, we should use row_number() instead of rank(). Any thoughts?
This is the best video I have ever seen
Can use qualify row_number() over (partition by department_id order by salary desc)
This was amazing.. keep doing this type of videos
Thank you! Will do!
absotuley amazing. Please do come up with more such complex problems and explain us.
I will try my best
This is very good detailed explanation.
Glad it was helpful!
Why you use cte??using alias table we can do
Great content , looking forward to see more such e.g for Amazon
Coming soon!
We need more video like this 👍
I’ll try my best to work on these
Hi Darshil Bhai please tell me how to build logical thinking for writing this kind of questions in SQL.
waiting for reply...
Practice practice practice
Wow Amazing content man
Appreciate it!
Recently came across your content and it really is super helpful and amazing Darshil! As someone who is looking to get into DE, do you feel we would be ready for an entry level position after completing DataQuests track? I really like the text based content rather than video
Thank you Matthew
I'd say try it by yourself whatever is comfortable, I also read books sometimes to learn things because I find it more insightful so if you like text based content, try it.
Worst that can happen is you will learn something new
Very helpful
Great
Great work, man
Appreciate it!
Hey darshi , I love the video ..... Before your video i see some other youtubers video the solve the problem but they didn't explain it well😓🥲. But you explain it in such a easy way 😁😍 please make this type of videos more 🥺. Can you tell us which website u use for this 🤔can we practice there this type of questions?
I used InterviewQuery for this, I have added link in description if you want to practice more
@@DarshilParmar ok thanks
okay, that was amazing
Thank you vaibhav
Cant we use GROUP BY department and then get the top 3 values by LIMIT 3?
If you use limit 3, it will only return 3 rows, we want to return 3 rows for each department
Try writing a query and executing it
@@DarshilParmar Thank you
We can also use subquery instead of cte right?
Yes, you can
Hi Darshil, we could use dense_rank() to avoid skipped rank. Right?
According to me dense_rank() is more appropriate.
Question says, highest top 3 employees salary by department, if we use dense rank and and if we have salary duplicates then we might not get expected output
Your assumption is correct and if question said something like "Find top the different salary by department" then we could have use dense_rank()
More such videos, bro.
More to come!
Good one
Thank you! Cheers!
Ur helping alot
Thank you
Sir tell the best sites to practice SQL questions
You can use InterviewQuery, I have added link on description
Thank you sir 😀
This is best video i have ever seen.