I love to engage with my readers and learn about their top concerns and questions when it comes to the technical interview process. In this article, I have included a question that I received from a reader about the SQL interview process.
The question that I will focus on in this article cover what you can expect in the SQL technical interview process, as well as how you should communicate this information with the interviewer.
Let’s get started by learning how you can prepare for an SQL interview, with some specific examples.
Reader's question: How should I prepare for SQL interviews?
In this section, I will give you some quick tips for preparing for SQL interview questions, with some specific examples from Facebook’s interview process.
As far as practice questions, I love to use Strata Scratch because the questions are directly from real companies. I would do medium and hard problems from all the educational modules they have available. There's over 500 SQL questions and I would seriously do as many as possible so that writing queries become second nature. I want the technical part to be the easy part of the interview process, as I would rather focus and spend my energy on communication and whiteboarding a solution with the interviewer.
I’ve gone through a few of the data scientist interviews at Facebook so I can help you with that and give you some insight into what type of questions they asked me.
Here are two examples of the type of questions you can expect:
In my experience across a few interviews at FB, the biggest focus they're testing for is an understanding of what the code is doing and the implications to the results.
Technically, the SQL portion is rather easy. You are either given 1 or 2 tables and asked to create a SQL query that requires doing a join or a self-join, or you are given SQL code and asked to debug it.
So long as you understand JOINS and slightly advanced functions like COALESCE, you'll be fine technically. What makes the interview difficult is linking how the code is written to the implications of the question they're asking you. Here’s an example:
For example, you are given 1 table that has user friend requests, acceptances, and dates all on 1 table. How do you write a query such that you'll get % of friend acceptances over time?
This query is easy to create, but you'll be additionally tested on the trade-offs of how you wrote the query. How do you deal with a friend acceptance that happened days later? Which day do you count the acceptance? Do you count it on the day the friend sent the request or do you count it on the day the request was accepted? There's no right or wrong answer here but you need to talk about the trade-offs between those two choices.
Another quick example: If you ran an AB experiment and saw a 2x increase in friend acceptance, with a p < 0.05, due to a new feature, do you deploy it to production? Most people would say yes, but in an interview, the most obvious answer is probably not the correct one. The correct one in this case is -- it depends. Then you talk about why it depends and what additional information you would need to make a decision.
These are all examples of the types of considerations you will be expected to mention to formulate a complete answer.
For a second example, you have a master table that contains a user ID and their latest login date, and you have a 2nd table that contains all the users that logged in for that day (there could be multiple logins on that day by the same user). Write a query that will update the master table with the user ID and their latest login date.
Simple enough, but you need to go through the exercise of understanding all the different scenarios. In this case, you have the scenario of a new user that just signed up that day, as well as a scenario where you have multiple logins from the same user for that day. How do you deal with these cases?
I'm sure you're thinking these questions are simple as you are reading this article. But what makes it hard is that you're not expecting these questions during the interview but you're being asked to dissect and solve it on the fly in front of an interviewer. It can be a stressful situation.
Main Advice for SQL Interviews
My main advice to you in preparing for an SQL interview is to understand why and how code is being written to solve a specific problem. Be prepared to communicate why you're writing specific lines of code, what logic you're adding to solve specific edge cases and scenarios, and what the output will yield. Your explanation is just as important (if not more important) than the code itself.
You'll need to know the trade-offs for every metric you're asked to create and how it may impact the question. You'll need to understand all the different scenarios and edge cases and how you can solve them in your code.
Also, be sure to talk with the interviewer as you're building the solution, and keep them in the loop about your thought process as much as possible.
I hope this one example summarizes the main ideas of what you can expect in an SQL technical interview. As you can see, it's mainly testing your understanding and application of the code in various scenarios.
It is perhaps most important that you effectively walk the interviewer through your thought process. Keep them in the loop about what you are thinking at all times. They are mainly testing your approach and your understanding of the technical aspects, and these things can be demonstrated even without a correct answer.
SQL interviews are meant to test your technical skills. Zero-in on the skills that are going to be included in your interview and be sure to do as many practice questions as possible.
So you’re looking to learn SQL and Python but you don’t know where to start. Or maybe you already know a little about these topics and you want to grow your skills. There are so many online resources out there claiming to be the best place to learn that it can be difficult to know who to trust.
You probably have heard about the big, online learning centers like Udemy, Codeacademy, and Khan Academy. These programs can be great for certain topics, but sometimes they are so large it can be difficult to know what they are best at.
The focus of this article will be on 6 smaller, more niche platforms to learn or hone your skills on SQL and Python. This article will give a small overview of each, as well as what makes them different and/or better.
The most important thing you can do to pick the best platform for you is to identify your needs. What is your skill level? What do you need these skills for? What concepts are you trying to learn? By identifying what skills and concepts you want to learn, you can effectively match your needs to one of the platforms in this article and pick the right one for you. So let’s get started:
6 Niche Platforms to Learn SQL and Python
Mode Analytics offers tutorials and courses for SQL and Python, and might be a great resource for you if you are a beginner looking to learn these skills. Mode offers separate training courses for each of these topics.
Each course is broken down in terms of more basic knowledge to more advanced knowledge. Beginners can start from scratch in each area, or can pick up in an area they are most comfortable. The courses are basic and straightforward, designed to teach you progressing skills related to analytics with SQL and Python. The courses are based around learning the syntax of each.
Mode is a valuable resource if you are looking for a basic, straightforward method to learn these concepts. However, it is somewhat limited in terms of offering users somewhere to grow and test their skills.
Their SQL courses are quite a bit more extensive, and do offer additional exercises after the course to grow skills. These exercises were based on interviews with Analytics managers, and meant to recreate some of the problems that they face regularly. However, the Python tutorial lacks these exercises, and instead points you to various external resources that you can use to test and grow your skills.
Overall, Mode offers a good, albeit basic place to learn and grow your skills, while lacking sufficient applications to test your skills. If you are just wanting a basic resource to learn syntax and concepts, then the simple layout might work great for you. However, if you are looking for something more extensive with more hands-on testing and problem-solving, you may want to keep reading through this list.
While the previous resource was quite lacking in methods and applications to test your skills, Strata Scratch is quite the opposite. They advertise themselves as providing the “building blocks” for growing your SQL and Python knowledge. So Strata Scratch is best suited for those who have a basic knowledge and are looking to grow it.
Strata Scratch provides over 500 SQL and Python practice questions to help improve your analytical skills in these areas. These questions were heavily researched and based on real industry problems, and many interview questions from various tech companies. This is built to be the ideal resource for prepping an interview or for advancing your career.
Strata Scratch also places great importance on explaining answers clearly. Each question provides in-depth video and article explanations of proper technical solutions, as well as clean approach and syntax. They focus on proper solutions, but also ensuring that the solutions are clean.
There are also beginner resources to teach you the basics of SQL and Python, along with the primary programs you need to be familiar with in these industries.
Overall, Strata Scratch is a great resource if your goal is to grow and test your skills. Often you will find that the best way to learn something is to have it continually tested. Strata Scratch offers many ways to test your knowledge in scenarios that are meant to mimic real-life scenarios and interview questions. If your aim is to grow your knowledge and advance your career, and you already have a basic knowledge of SQL and Python, then Strata Scratch is aimed toward you.
DataCamp is meant to be a streamlined way to learn skills from many topics, including SQL and Python. DataCamp structures their courses in a very simple way, from basic to most advanced. You can pick up a lesson from anywhere, depending on your skill level, and grow your understanding of various concepts.
DataCamp offers lessons in bite-sized lengths. This is intended so that you can pick up and learn a new topic in a short period of time, and perhaps do it while you are on-the-go or while you are busy with other things. It is intended to be a tool for growing your skills in your spare time, and investing as much time into it as you want.
The lessons are quite useful and numerous. We find that DataCamp offers more niche and focused subject areas than platforms like Mode. You will also have an easier time finding subjects that cover more specific use cases, or learning how to code for specific problems or workflows.
DataCamp also offers many ways to test and practice your skills. There are many mini practice challenges offered on each subject. Additionally, if you are looking for a more extensive way to test your skills, there are hands-on Data Projects offered. These are more extensive problems and projects which are based on real-world scenarios. However, we have found the sheer number of problems and projects to be limited in certain subject matters.
Overall, DataCamp is a streamlined, well-organized platform that is meant to teach you skills, and test them through various problems and projects. If you are looking for a platform that is organized, intuitive, and organizes each subject area into highly focused, bite-size lessons, then this could be the platform for you.
w3schools is a simple, no-frills tool for learning web development skills, including SQL and Python. Depending on your preferences, you will probably either love or hate w3school’s approach to learning. w3schools claims to be the world’s largest web developer site, so their methods clearly work for many people.
Essentially, the method of teaching here is simple and basic. The course is outlined from simplest to most advanced concepts, with each page providing a description of the concepts, with everything from syntax to important functions and keywords. So if you prefer to learn in a simple way, by having the topic outlined and explained clearly and succinctly, then you might really like this method of learning.
Additionally, w3schools makes heavy use of examples and interactivity throughout its lesson. Once a concept is explained, it will generally provide an immediate example of how it looks with proper syntax. Often, it even includes a customizable field where you can solve an example problem yourself.
Overall, w3schools is perhaps so popular because of its simple, straightforward approach to teaching SQL, Python, and many other programming languages. Clearly marked topics, combined with straightforward explanations, and a place to test your skills make up most of the lessons plans. However, if you are looking for a resource with more extensive exercises or real-world problems to solve, you probably are best to look elsewhere.
Perhaps most importantly to many people, the entire course is available free, without even so much as registration!
Hacker Rank is another valuable platform for teaching skills and testing knowledge as it pertains to SQL and Python. Their educational portion of their service is clearly geared toward people who already have at least a basic knowledge of SQL and Python, and are looking to hone their skills for an interview or for real-world applications.
Within Hacker Rank’s “Practice” portion of their service, there are offered many practice questions and problems to test your skills. You can choose from a variety of languages, including SQL and Python. The challenges are ranked according to Easy, Medium, and Hard, and the system tracks your progress as you go, with a “Leaderboard” for the highest ranking problem-solvers. You can also organize the challenges according to subject areas and subdomains, to narrow in on certain syntax issues or specific problems or workflows.
Overall, these are valuable tools if you are looking to test your skills in these areas and prepare for the problem solving you might see in a job interview or on the job. These are great if you are a hands-on learner and like to see how concepts are applied, rather than simply being explained how they work.
Additionally, there are discussion forums offered for you to chat, share, and help others with the problems and share insights into the interview process.
Guru99 is a free resource meant to teach a variety of skills, including sections on SQL and Python.
Guru99 offers lessons in SQL and Python, sorted from the basics to the more advanced concepts. Classes are either written or in video form.
Similar to w3schools, this is a simple, no-frills approach to teaching that attempts to lay out all the relevant concepts and explain them in a simple, straight-forward manner. One of the major advantages of Guru99 is that it covers a broad range of concepts and functions, and is useful to build your knowledge in many areas of SQL and Python.
Whether you are a beginner or are looking to learn more advanced concepts, the subject areas are clearly marked so you can choose a lesson that is in-line with your skill level.
While Guru99 is an easy, simple tool to build your knowledge, it doesn’t have much in the way of testing your knowledge. Courses are mainly non-interactive, with no areas to write your own code or solve sample problems. If you are looking to test your skills, you may want to supplement the concepts you learn here with another service such as Hacker Rank.
Overall, this might be a great program for you if you are looking for a well-organized resource where you can learn concepts at your own pace. And of course, it is free so you can try it out and see whether it is the resource for you.
There you have it, 6 lesser known resources for learning SQL and Python skills. As you can see, these resources vary pretty significantly in their goals and how they teach and test various subject matters. These resources focus on varying skill levels, and are meant to serve various purposes. Whether it be to prepare for an interview, or to build up basic skills, there is generally a primary focus for each online resource.
A key difference that will be most relevant to you is what kind of learning style each online resource focuses on. Many, such as w3schools and Guru99, simply focus on straightforward learning and explanation of concepts. However, others, such as Hacker Rank and Strata Scratch, aim to offer resources to build your understanding through practice and the solving of real world problems and scenarios.
Ultimately, the best resource for you depends on what you are looking to learn and also your learning style. Evaluate what you already know about these topics, and which resources offer the lessons that are most in line with your skill level. Also, consider how you like to learn. Are you more hands-on or do you like concepts to be explained to you in a simple way?
By understanding your needs and your goals, we are confident that you will find a great resource among the above listed to expand your knowledge in SQL and Python. As a bonus, a few of them are free and you can try them out risk-free. Learning new skills is a rewarding experience, and it is all the more satisfying if you find a learning resource that matches your specific preferences.
Do you want your online business to succeed? If yes, it is important that you understand your data perfectly. Well, SQL or Structured Query Language can help you with that. This popular programming language is used to pull information from a database.
Though SQL can’t be used to create web applications, it can interact with the relational database systems built into many applications. Knowing how to use SQL lets you retrieve just any kind of data you want to know about your customers and business. When the SQL language has so many benefits why not learn it?
Strata Scratch is a well-known online platform where you can learn SQL and enhance your analytical and marketing skills to a great extent. At Strata Scratch, you can practice SQL and Python with more than 40 problem sets. Isn’t it great?
In terms of marketing and data management, SQL has many advantages over traditional data programs. Suppose you have an Excel Spreadsheet containing every bit of data about your customers such as what plans they are on, when they sign up, how often they purchase your product/service, what marketing campaign they see. In short, every action they take on your website and within your application.
With the help of SQL, you can utilize this data to cohort analysis and see if your targeted audience is using your product more or less over time, to examine different marketing campaigns, to see what actions your users are taking and to figure out the demographics of your targeted audience – that will help you in creating ad campaigns targeting similar demographics.
As business departments are becoming more data-driven nowadays, learning SQL is quite important. Here at Strata Scratch, we teach you the fundamentals of writing SQL queries to pull and process your data.
We have designed our SQL guides and exercises specifically for marketing and business applications. Whether you are a newbie who wants to start the coding right away or an expert eager to learn the latest perspective in data analytics, we can serve you. Additionally, we go through the real-world business and case studies to better understand data-driven analytical methodologies. In short, with us, you can rest assured that you will build your confidence in SQL and data analytics.
Write something about yourself. No need to be fancy, just an overview.