 What is going on everybody? My name is Alex Febregan. Today, we're going to be looking at data analyst interview questions For the most part, we're really just going to be looking at SQL interview questions But if you want me to make a Python interview questions video in the future, I can be sure to do that Now we're going to be going through a lot of information any ton of questions today Every single question that you see here is going to be on my github with all the answers below it So if I don't cover that exact question in this video, you can check it out And I will have the answer on my github. The link is in the description if you want to read that later So with that being said, let's get into it So now let's look at some phone interview questions And for the most part, you're just going to be asked broad generic questions Just to gauge your abilities on a few different subjects And then when you get to the in-person interview, they'll ask a little bit more technical questions And we'll get to the in-person interview stuff in just a little bit But now let's look at a few questions for the phone interview stage So a few questions that they might ask you are things like on a scale of one to ten How would you rate your SQL abilities? Can you describe or how do you currently use SQL? And have you ever used a cloud-based platform? Now these are kind of the more technical questions or broad technical questions that they may ask you And these give you an opportunity just to talk a little bit about what you know and how you view SQL in the past So for me, I might say that I'm an eight out of ten in SQL And I currently use it to query tables and views As well as create reports and automate stored procedures To send out those reports to clients on a weekly or monthly basis And for the cloud-based platform, I might say that I've used Amazon Web Services As well as Azure and in Azure where I use Azure Data Lake as well as Data Bricks And I'm mostly using that for data acquisition and data augmentation So like I said, those are the more technical questions that I think they may ask you There are some more broad questions that they may ask as well Something like what was your most challenging data analyst project? Describe a time when you had to work with a group on a data analyst project? Are you familiar with any cloud platforms? And describe a time when you've made a mistake on a project and how you handled it So for that last one, I might say something like this I was working directly with a client to do some analysis on some 2019 data for a deliverable that they have And at the time we had two separate servers One server had old historical data and another server had new updated data And in those servers, they basically had all the same databases in the same tables And so when I was doing my analysis, I accidentally used the old server instead of the new server When I sent my analysis over to the client, they noted that the numbers looked a little bit off And I quickly retraced my steps and figured out that I'd been using the wrong server with the wrong database And the wrong table the whole time When I figured out the mistake, I let them know as soon as I could and that I get them a new analysis as quickly as I could Luckily, I had a really good rapport with the client and he said it was totally fine Just to get them a new analysis of the correct data as quickly as I could I had actually sent them the wrong analysis about three days before a deadline So I had three extra days to get them the new analysis So I was able to meet the deadline in the end. That was definitely a mistake on my part I just wasn't thinking I made a mistake and I made sure to never do that again Something to remember is that when you're answering any of these questions, you want to make yourself look as good as possible So even though I'm talking about how I made a mistake I made sure to talk about how I had really good rapport with the client How I notified the client right away and how I got them a new analysis before the deadline was even up So even though we're talking about me making a mistake I made sure to highlight some of the things that make me look good or some of the things that the interviewers might want to hear So now let's look at some in-person interview questions Now the phone interview questions were kind of broad and generic and the in-person interview questions are a little bit more specific And a little bit more technical Let's look at some beginner questions And then we'll move on to some intermediate questions that you might be asked So for the beginner questions, there are questions like what is the difference between a table and a view How would you write a query that would remove duplicate records? I have two columns called drug name and drug price Each drug has different prices Depending on where it is being sold. I want to see the drug name with the highest price It is being sold at how would you write that query now? I'm actually going to stop and show you the answer to this question If you want to pause it and you want to try to get the answer correct before we look at the answer Go for it. If not, we're going to look at it right now So here is the answer Let's briefly go through the question again and then look at the answer So you have two columns drug name and drug price And each drug has different prices depending on where it's being sold So that means there could be drug aspirin aspirin aspirin and three different prices And we want to get the price that is the highest And so I want to see the drug name with the highest price is being sold at how would you write that query? So we're going to do select drug name comma max, which is an aggregate function Which is going to give us the highest or the largest number of drug price And then we're going to do from table and then group by drug name And we have to do the group by because we're using an aggregate function in the select statement And then we're just ordering it by the drug name and that will give us the output that we are looking for On to number four. What does the group by statement do in a query? And why would you use it? And then number five is I have a column called drug name I want to look at drugs that start with aspirin How would you only return drug names that start with aspirin? And then the answer for that one is use the like operator So you'll do like aspirin and then have a wild card after that and that's the answer to that one So now let's move on to some intermediate questions They're going to be a little bit more difficult a little bit more challenging and the beginner questions I think the beginner questions are more geared towards Entry level data analysts where the intermediate might be a little bit more difficult Or for a higher level position But you never know they might be asking really difficult questions for that entry level job You know, I don't know. So let's look at these intermediate questions really quick So the first one is what is a sub query and can you describe how you would write that? What is a join and what data would be returned if you use an inner join? What is the difference between an inner and outer join? What is a case statement and how would you use it? What is a union operator and how would you use it? And then for number six is I have two tables one table contains patient information and the other contains a drug information In the patient table, we have a patient ID first name last name and disease In the drug table, we have a patient ID dispensed drug date dispensed Can you create a query to return patient ID disease and dispensed drug? So now let's look at the answers to number two and number six again If you want to try to solve these before you look at them, that's totally fine But we will look at the answers right now So for question number two It said what is a join and what data would be returned if you use an inner join? And the answer might be something like this a join combines two tables into a single output An inner join will return data that intersects or is common between both tables And for example, if table one has abc and table two has b and c Only b and c will be returned because a is only in table one So that is what a join is and that is what an inner join would return So now let's look at number six. It says I have two tables One table contains patient information and the other drug information In the patient table we have ID first name last name disease in the drug table We have patient ID dispensed drug date dispensed All you want to do is combine these tables and have patient ID disease and dispensed drug So in order to do that, you're just going to do an inner join So the answer is select patient dot patient ID We have to do patient dot because we have to specify what table it is because patient ID is in both the patient and the drug table comma disease comma dispensed drug From the patient table and we're going to join the drug table on Patient dot patient ID is equal to drug dot patient ID These are more technical interview questions You may get other questions like tell me about yourself or questions that you might get in any interview for any job I want it to be more specific and intentional about doing data analyst specific questions And not just general questions that you'll get anywhere. Remember if you want the answers to any of these questions I will have all the questions and the answers on my github the link is in the description Thank you guys so much for watching I really appreciate it if you like this video be sure to like comment and subscribe below and I'll see in the next video