Data Engineer Interview Questions: SQL
In this post, I will try to share some actual questions asked by top companies for Data Engineer positions. A lot of these companies will cover data modelling as one of the rounds and will use the data model for the next round based on SQL queries.
Q1: Find the number of drivers available for rides in any area at any given point of time.
Q2: Do you consider Driver and Rider as separate entities? Why or why not?
Q3: Give me all passenger names who used the app for only airport rides.
Q4: How will you decide where to apply surge pricing?
Q5: How will you calculate wait times for rides?
Q6: A driver can ride multiple cars, how will you find out who is driving which car at any moment?
Q7: Find out Rank without using any function.
Q8: How will you delete duplicates from a table?
Q9: How will you find percentile?
Q10: You have 3 tables, user_dim (user_id, account_id), account_dim (account_id, paying_customer), and dload_facts (date, user_id, and downloads), find the average number of downloads for free vs paying customers broken out by day.
To answer these questions, first we need to come up with a feasible data model. For this post, i will refer to the model we built in the last post. For more details about the data model, see my previous post.
Some more questions with solutions and discussions are summarized at: https://www.datageekinme.com/projects/leetcode-sql-solutions/
Q1: Find the number of drivers available for rides in any area at any given point of time.
Q2: Do you consider Driver and Rider as separate entities? Why or why not?
Q3: Give me all passenger names who used the app for only airport rides.
Q4: How will you decide where to apply surge pricing?
Q5: How will you calculate wait times for rides?
Q6: A driver can ride multiple cars, how will you find out who is driving which car at any moment?
Q7: Find out Rank without using any function.
Q8: How will you delete duplicates from a table?
Q9: How will you find percentile?
Q10: You have 3 tables, user_dim (user_id, account_id), account_dim (account_id, paying_customer), and dload_facts (date, user_id, and downloads), find the average number of downloads for free vs paying customers broken out by day.
To answer these questions, first we need to come up with a feasible data model. For this post, i will refer to the model we built in the last post. For more details about the data model, see my previous post.
Some more questions with solutions and discussions are summarized at: https://www.datageekinme.com/projects/leetcode-sql-solutions/
Hi Nice blog. Do you have SQL solutions for above SQL quires. please do share if you have.
ReplyDeleteYeah, in the process to write that post. Do share the blog if you liked it.
ReplyDeletehi @kautuk Pandey Can you please post the SQL for the above questions ?
DeleteHi Pandey ji, please do share solutions for above queries.if you have already written please provide me link It would be very helpful.
ReplyDeleteThanks.
Thank you Pandey for writing a series of the great articles about Data Engineering. I was wondering if there are any updates regarding the solutions or the thinking processes that people mentioned above. Also, for the second question, is that for E-R design or Dimensional modeling design? Thanks.
ReplyDeleteHi Kaushik, can you please share the SQLs for the above questions if you have them handy? Thanks.
ReplyDeleteThe impression you make on a person when you first meet is the most important. Remember to look the other person directly in the eye, smile, shake hands firmly, and speak confidently. Try to remember the person's name and, if you have the opportunity to use it during the first five minutes of the conversation, do it! This will help you remember it better, and your interlocutor will be flattered.
ReplyDeleteThanks for the advice. I also have an interview soon. I do this. if not for the ResumeGet team https://resumeget.com/resume-rewrite , I was looking for work further. ResumeGet gave me the perfect resume. I sent it to several companies and already on Thursday I have an interview
ReplyDeleteThank you so much for this nice information. Hope so many people will get aware of this and useful as well.
ReplyDeleteIndium Software
Can you provide the solutions. https://www.datageekinme.com/projects/leetcode-sql-solutions/ is broken
ReplyDeletenice post.
ReplyDeleteData Science Online Training in Hyderabad
Data Science Online Course
Extremely good article... Thank you for sharing this useful information; the contents are fascinating. I'll be anticipating the next piece on data engineering solutions data engineering solutions.
ReplyDeleteExcellent article and this helps to enhance your knowledge regarding new things. Waiting for more updates.
ReplyDeleteBest PHP Frameworks
Most Popular PHP Frameworks