Shadowing Practice: Solving Easy SQL Interview Questions on Analyst Builder - Learn English Speaking with Video

בחר מצב תרגול

כל מצב פותח חדר תרגול במסך מלא.

205 משפטים
אם המשפטים קצרים או ארוכים מדי, לחץ על ערוך כדי להתאים אותם.
1
What's going on, everybody?
2
Welcome back to another video.
3
Today, we are going to be solving easy SQL technical interview questions.
4
Now, when I was interviewing for data analyst positions, I almost always got some type of technical interview.
5
And the vast majority of the technical interviews that I got were in SQL.
6
Not only that, but I was also on a hiring team and later as a hiring manager,
7
I almost always conducted some type of SQL technical interview.
8
Now, why do hiring managers conduct these interviews.
9
It's because they want to make sure that you actually know the skill
10
because you can just put SQL on your resume and not actually know it at all.
11
And then when they hire you, they have to spend two,
12
three, four months training you on the basics of SQL for you to actually understand it and use it.
13
That is not what any hiring manager wants.
14
And so that's why they conduct these SQL technical interviews.
15
So in this series, we're going to start with easy questions.
16
That'll be in today's video.
17
Then we'll go on to medium, hard, and then very hard SQL technical interview questions.
18
So without further ado, let's jump onto my screen and take a look at the easy SQL interview questions.
19
We're gonna be practicing these questions on analystbuilder .com.
20
And if we come right over here, we can filter to the free questions and we can filter to the easy questions.
21
These are all the free and easy questions that you can go and take right now.
22
I will leave a link in the description.
23
I will also leave a link to the two questions that we're gonna be looking at today,
24
but go ahead and check out this if you wanna try out all of these different questions.
25
There's also different difficulties.
26
So we're gonna be working through the moderate it and the hard ones in future videos.
27
And then we'll also be looking at the very difficult ones in the very last video in this series.
28
But let's go ahead and get rid of this because we're going to go over to our very first question.
29
Now, really quickly, I just want to show you the interface before we actually dive into the question.
30
Now, we're going to be solving this in MySQL, but you can also practice in PostgreSQL and Microsoft SQL Server,
31
whichever one you have an interview coming up for.
32
If that company uses
33
Microsoft SQL Server, come in here and use
34
Microsoft SQL Server.
35
And we also have
36
Python as well.
37
But we're going to be doing this in MySQL.
38
This is where we'll write our actual SQL code.
39
Then we have the prompt.
40
Now in an interview, typically they're going to give you some type of prompt and then the data.
41
They're going to ask you to do something with the data.
42
And our data is right down here.
43
So this is our data.
44
Now this is a practicing platform, right?
45
To practice for technical interview questions or practice for your technical interviews.
46
So we also have hints and expected output, as well as a video explanation walking through this question, showing you exactly how to do it.
47
But if you can't get it at all, you can always come in here and look at the solution for any of these.
48
But let's go ahead and start this question.
49
The question is called car failure.
50
It says, cars need to be inspected every year in order to pass inspection and be street legal.
51
If a car has any critical issues, it will fail inspection or if it has more than three minor issues, it will also fail.
52
Write a query to identify the cars that passed inspection.
53
Outputs should include the owner name and vehicle name ordered by the owner name alphabetically.
54
Now, let's go take a look at this data.
55
So we have the owner name, vehicle name, minor issues, critical issues, and that's all we have.
56
So it's just a simple one.
57
Again, this is an easy question, at least on Analyst Builder and
58
so let's try to solve this without any of the hints
59
or looking at the expected output because I think we can solve this one.
60
Now, the first thing that we need to take into consideration is we're going to need to be filtering.
61
So we'll need to filter down some data.
62
So if a car has any critical issues, it'll fail.
63
So if critical issues is one, two, three, it's going to fail.
64
So it can't have no critical issues
65
and they'll say and cause even though this says
66
or right here it doesn't mean one or the other it means
67
if it has this or it has this it fails
68
so we actually need an and here so both conditions need to be met or more than three minor issues
69
so you can't have either of those
70
now in our output for what we're going to get down here we need to have just two things
71
We just need the owner name and vehicle name.
72
So let's put that owner name and vehicle name.
73
And then lastly, we just have to order by the owner name.
74
And that's going to be ascending, ASC.
75
Ascending is just A to Z.
76
So I think we can go ahead and start writing this out because I think that's all we need to do.
77
Now let's go ahead and run this.
78
And so we have our data right down here.
79
Now here's what we need to do.
80
We are trying to identify cars that passed the inspection.
81
So we need to filter out the ones that had a critical issue or that had three or more minor issues.
82
So what we're gonna do is we're gonna come right over here.
83
And the first one we'll do is critical issues.
84
So we're gonna say where critical underscore issues.
85
And we need to say it's equal to zero.
86
And let's run this.
87
And it looks like I had a space here.
88
Let's run this again.
89
There we go.
90
So now, these are cars that have no critical issues.
91
So these ones are passing.
92
But if we just look at our data right down here, we have some that have four, four, five.
93
So we also have to say, and, and I'm going to copy this so I don't have another problem with that.
94
So, I'm going to say where it's less than or equal to, then I'm going to say 3.
95
So, if it has 3 or less, it should be in our output.
96
So, let's run this.
97
And I say greater than.
98
Let me do less than.
99
There we go.
100
And we can see that now the minor issues are all 3 or less.
101
And let's just make sure.
102
Or if it has more than 3.
103
So, if it had 4 or 5, it should not be in our output it.
104
So these has 320222 and this has 0000.
105
So these are cars that should pass.
106
Now right now we've been selecting everything, but what we really need to do is just select the columns that we need.
107
That's going to be owner underscore name and vehicle.
108
So let's run this.
109
And this looks really good.
110
And the last thing that we need to do is order by.
111
So we need to order by the owner name.
112
Let's get that owner name.
113
And we need to do that in ascending.
114
Now, by default, when you use order by to organize and sort a column, it automatically is in ascending,
115
but I like to at least put it there explicitly so I can see it.
116
And this to me should be the correct answer.
117
Now, what we need to do to check our answer
118
and actually show if we got the answer right is just click this check answer button.
119
We can also do control shift enter, but I'm going to click the check answer.
120
And there we go.
121
We got the solution correct.
122
So let's go ahead and come up here.
123
We're going to go to our next question.
124
This is another easy question on Analyst Builder.
125
Again, I'm going to leave a link in the description if you want to try out this exact question.
126
But let's take a look at this one.
127
This is called Apply Discount.
128
It says a computer store is offering a 25 % discount for all new customers over the age of 65
129
or customers that spend more than $200 on their first purchase.
130
The owner wants to know how many customers received that discount since they started the promotion.
131
Write a query to see how many customers received that discount.
132
Okay.
133
And let's go down and look at the data.
134
So we have customer ID, we have their age, and then we have their total purchase.
135
And let's just see if there's any duplicates in this customer ID.
136
It doesn't look like it.
137
It looks like they're all just one purchase.
138
The reason I was looking at that is it says all new customers, and it looks like these are all new customers.
139
It doesn't look like there's any repeat customers that are old customers.
140
So we're going to assume these are all new customers.
141
If there was a multiple 1 ,001s, I would look for something like a transaction ID or a transaction date,
142
but those types of questions are usually a little bit more difficult in like the medium hard types of questions.
143
But let's go make some notes real quick.
144
So we have to filter on two different things.
145
They have to meet one of these criteria in order to be in the output.
146
They either have to be over the age of 65, so over 65, and let's do over 65,
147
or they just have to meet one of these, or have spent more than 200, or spent more than 200.
148
And that shouldn't be capitalized.
149
So that's what we need
150
And then the owner is just wanting to know
151
How many customers received that discount
152
So we're going to do a count
153
On the number of customers
154
That fit that filter I'll write it like that
155
So it's just going to be a number in our output
156
This one should be I would say even a little bit
157
Simpler than the last one
158
Because we're not having to filter
159
Or really do anything like that
160
Now let's run this
161
And let's come down here.
162
So we're gonna do a count eventually on this customer ID,
163
but what we need to do is filter on both the age and the total purchase.
164
So let's write this out.
165
So age needs to be, and I need to write where, where age is greater than 65.
166
Now, I'm not saying greater than or equal to, because right here it says for new customers over the age of 65.
167
If it said age 65 or over, I would say greater than or equal to.
168
I want to be, these questions can be very specific.
169
And then we'll say and, or actually or, because it's either of these need to be true.
170
Or the total purchase.
171
And again, it says more than 200.
172
So we're going to say greater than 200.
173
Now let's run this.
174
And let's just kind of look down here.
175
There's a lot of people that fit this bill, it looks like.
176
Yeah, the majority of people, that's great.
177
So we're gonna give them a discount.
178
These are people that received a discount.
179
So all we're gonna do is account on this customer ID.
180
So let's do account on customer ID.
181
Let's run this, and our answer is 14.
182
All we have to do is check this answer to make sure it is correct.
183
So let's hit the check answer, and there we go your solution is correct.
184
Now, one thing I will say about just technical interviews in general is oftentimes
185
they want to make sure you know how to write it, but even more so, they're really checking to make sure you understand how SQL works.
186
So when I'm writing this out, if I'm in an actual interview, I would be talking this out loud to the interviewer who's interviewing me.
187
I would say, okay, it looks like I need to filter on this
188
and I need to do a count on these things.
189
Now, you only would know how to do that if you know MySQL or if you know SQL, right?
190
Again, they really wanna hear your thought process.
191
And so walking through it exactly how I did in the actual interview is exactly what the interviewer wants to hear.
192
Now, writing it correctly is still very important, especially as you get to the more difficult questions, right?
193
You want to know certain functions and certain ways to write things, but you should be talking all this out loud during your interview.
194
Now, one other really cool thing, I'm just going to show you this at the end is if I go over to my profile,
195
I'm actually earning points for these questions.
196
So right down here, I just earned a couple extra points towards my MySQL badge
197
and I can go all the way up to expert and then master as well.
198
And so I am well on my way.
199
And then in future videos, when we do the medium and the hard and then the very hard questions,
200
we earn even more points for those because they are more difficult and they go towards these badges.
201
So that is how we solve those easy SQL technical interview questions on Analyst Builder, go ahead and try those out.
202
There's tons of other free questions on the platform that you can just try out.
203
And there's lots of easy ones, but then we're also gonna be taking a look at medium, hard, and very hard in future lessons.
204
With that being said, I hope you enjoyed this video.
205
If you did, be sure to like and subscribe below, and I will see you in the next video.

הורד אפליקציה

כל מה שאתה צריך כדי לדבר בשטף

הגיית AIציון לכל משפט
תרגול IPAשלוט בכל צליל
אוצר מיליםבנה את מאגר המילים שלך
משחק אוצר מיליםלמד תוך כדי משחק

אותו ערוץ

FOR YOU

המלץ על סרטון

אוצר מילים והערות הגייה לשיעור הזה

שיעור הדיבור הזה מבוסס על הסרטון “Solving Easy SQL Interview Questions on Analyst Builder”. המילים שחוזרות הכי הרבה: customer, interview, Sql, issue, owner. בסרטון הזה יש 205 משפטים ו-2342 מילים לתרגול Shadowing. הדיבור נמשך 12:05. הדובר מדבר מהר, כ-194 מילים בדקה, אז צפו לצלילים מחוברים ומקוצרים. 90% מהמילים נמצאות בין 3,000 המילים הנפוצות ביותר באנגלית, כך שקל לעקוב אחרי אוצר המילים.

אוצר מילים מרכזי בסרטון הזה

15 מילים מהסרטון שכדאי ללמוד, עם ההגייה והמשמעות שלהן:

מילההגייהמשמעות
filter שם עצם/ˈfɪltɚ/מַסנֵן
output שם עצם/ˈaʊtpʊt/פֶּלֶט
discount שם עצם/ˈdɪskaʊnt/הֲנָחָה
solve פועל/sɒlv/פָּתַר
select פועל/sɪˈlɛkt/בחר
transaction שם עצם/tɹænˈzækʃən/עִסְקָה
hint שם עצם/hɪnt/רֶמֶֶז
badge שם עצם/bæd͡ʒ/תָּג
lesson שם עצם/ˈlɛs.ən/שיעור, שִׁעוּר
explanation שם עצם/ˌɛkspləˈneɪʃən/הֶסבֵּר
skill שם עצם/skɪl/מְיֻמָּנוּת, כִּשּׁוּרִים
promotion שם עצם/pɹəˈmoʊʃn̩/קידום
column שם עצם/ˈkɒləm/עַמּוּד
difficulty שם עצם/ˈdɪfɪkəlti/קושי
default שם עצם/dɪˈfɔlt/ברירת מחדל

Phrasal verbs שתשמעו

מילהמשמעות
check out פועלבדק
go down פועלירד

משפטים שכדאי לחזור עליהם

משפטים קצרים ושלמים מהסרטון שאפשר להשתמש בהם בשיחה יומיומית:

  • We're gonna be practicing these questions on analystbuilder .com.
  • Let's get that owner name.
  • We're going to go to our next question.
  • I'm actually earning points for these questions.

הגייה ששווה לשים לב אליה

הדובר משתמש ב-66 קיצורים וצורות מקוצרות, כמו we're, gonna, I'm. אמרו אותם בצורה הקצרה, כפי שאתם שומעים אותם.

  • הצלילים של “sh” ו-“zh”: inspection /ɪnˈspɛkʃən/, transaction /tɹænˈzækʃən/, explanation /ˌɛkspləˈneɪʃən/, promotion /pɹəˈmoʊʃn̩/, consideration /kənˌsɪd.əˈɹeɪ.ʃən/
  • מילים ארוכות — שימו לב להטעמה: explanation /ˌɛkspləˈneɪʃən/, difficulty /ˈdɪfɪkəlti/, consideration /kənˌsɪd.əˈɹeɪ.ʃən/, capitalize /ˈkæpətəˌlaɪz/, criterion /kɹaɪˈtɪɹ.i.ən/

צלילים שדוברי עברית מתקשים בהם:

  • /w/ — שפתיים מעוגלות, לא /v/: query /ˈkwɪɹ.i/, whichever /wɪt͡ʃˈɛvɚ/
  • /æ/ — פתוח יותר מה-“אֶ” העברית, לא כמו “a” ב-“cup”: analyst /ˈænəlɪst/, transaction /tɹænˈzækʃən/, badge /bæd͡ʒ/, vast /væst/, lastly /ˈlæstli/
  • /r/ — הלשון לא נוגעת בשום מקום, לא ה-“ר” הגרונית: hire /ˈhaɪɹ/, transaction /tɹænˈzækʃən/, prompt /pɹɑmpt/, query /ˈkwɪɹ.i/, promotion /pɹəˈmoʊʃn̩/

איך לתרגל עם הסרטון הזה

  1. הקשיבו לכל הסרטון פעם אחת בלי לדבר, ורשמו את המילים שאתם לא מכירים.
  2. התחילו במהירות 0.75×, תרגלו Shadowing משפט אחר משפט, וחזרו למהירות רגילה כשזה מרגיש קל.
  3. הקליטו את עצמכם והשוו למקור, תוך תשומת לב למילים כמו filter, output, discount.

מהי טכניקת השאדואינג?

שאדואינג היא טכניקת למידת שפה מבוססת מדע שפותחה במקור להכשרת מתורגמנים מקצועיים ופופולרית על ידי הפוליגלוט ד"ר אלכסנדר ארגואלס. השיטה פשוטה אך עוצמתית: אתה מקשיב לאודיו באנגלית ילידית וחוזר עליו בקול רם מיד — כמו צל העוקב אחרי הדובר עם עיכוב של 1–2 שניות בלבד. בניגוד להאזנה פסיבית או תרגילי דקדוק, שאדואינג מכריח את המוח והשרירים בפה לעבד ולשחזר דפוסי דיבור אמיתיים בו זמנית. מחקרים מראים שזה משפר משמעותית את דיוק ההגייה, האינטונציה, הקצב, הדיבור המחובר, הבנת השמיעה ושטף הדיבור — מה שהופך אותו לאחת השיטות היעילות ביותר להכנה לIELTS Speaking ולתקשורת באנגלית בעולם האמיתי.

טכניקת Shadowing: קרא את המדריך המלא שלב אחר שלב →