쉐도잉 연습: Learn Basic SQL in 15 Minutes | Business Intelligence For Beginners | SQL Tutorial For Beginners 1/3 - 영상으로 영어 말하기 배우기

연습 모드 선택

각 모드는 전체 화면 연습실로 열립니다.

201 문장
문장이 너무 짧거나 길면 Edit를 눌러 조정하세요.
1
In this video, you're going to learn the basics of SQL querying in just 15 minutes.
2
And by the time we're finished, you'll be wondering what all the fuss was about.
3
Are you ready?
4
Then let's get started.
5
Hello and welcome to Vitamin BI, bringing you business intelligence for beginners and beyond.
6
On this channel I help you do more with data, so if you're new here consider subscribing.
7
Right, so as I said in my intro I'm going to teach you the basics of SQL querying,
8
the essentials that you'll need to know if you're considering becoming a business intelligence analyst.
9
Obviously we can only go so far in 15 minutes, but I promise you
10
that by the time we're finished
11
you'll be able to understand quite a lot of what you might be called upon to do.
12
We'll be focusing specifically on querying data, not creating or deleting databases,
13
tables or data, just selecting data from tables that we want to return for our specific needs.
14
Before we get started, let me give you a little context.
15
You might be wondering why you need to learn SQL with BI tools becoming more and more sophisticated.
16
Can't they write the SQL queries for me the answer to
17
that is yes and no yes
18
when it comes to requesting data for different charts graphs and tables
19
that you might want to present in dashboards in these cases
20
the bi tool will have some kind of graphical interface to be able to drag
21
and drop fields to return data but no in
22
that in a lot of cases you'll need to write sql queries to pre -aggregate filter
23
and select only the data necessary for the project that you're working on.
24
These are often called views and you create views mainly
25
because it's more efficient than connecting to all data when you only need some of it.
26
So you could have a table that contains millions of rows of data
27
but by creating a view of it your BI tool will
28
only need to work with a few thousand making analysis and presenting results much faster.
29
So you see, knowing how to query with SQL is a useful skill to have.
30
Let's jump onto my computer and get started.
31
So today we're working with a SQLite database that I found online, containing data compiled from the FIFA video game by EA Sports.
32
So soccer stats.
33
I'll leave a link to the database in the description if you want to play around with it too.
34
In terms of the tool I'm using to query the database?
35
It's called NaviCat.
36
It's the premium version that allows you to connect to and query pretty much any relational database.
37
But they also have a version for specific RDBMS like MySQL, SQL Server, etc. Link also in the description.
38
Here we're in the NaviCat interface.
39
On the left we can see that I'm connected to the SoccerDB connection
40
that I've created and in that connection is a database called main and in that database we have various tables country,
41
league, match, player etc. We're going to be working mainly with the player table.
42
If I double click it we'll see the data contained within that table.
43
We've got three different IDs, player name, birthday, height and weight.
44
What I want to do is write SQL queries
45
and ask the database to return specific data from this table so I'll open a new query window.
46
Now when we're asking for data we're using what's called a select statement
47
so that's what we need to write first and
48
if we want to return the whole table in the result we do so with a star.
49
Then we specify the table that we want to select everything from.
50
In this case the table called player select star from player then we run the query
51
and the database returns all data from that table you may notice
52
that i've written everything in lowercase
53
because the sequel isn't case sensitive however i have the option to what's called beautify the sequel
54
and when i do you'll notice that select
55
and from have been capitalized although it's not obligatory this does actually make your queries easier to read.
56
It's not so important with such a small query like this one
57
but when you've got one with tens if not hundreds of lines of code it really does make life easier.
58
So we've selected all fields or columns and all rows from the table
59
but what if we only want to select specific fields?
60
Simple.
61
Instead of the star we just write out the field names
62
we want separated by commas like this player underscore name comma birthday I run this,
63
and those are the fields returned.
64
When we select specific fields, we can also rename them by creating aliases.
65
To do this, we use the as function.
66
So player name as name.
67
And we can see that update.
68
We could specify an alias containing a space, but to do this, we would need to put the name in quotes like this.
69
Full name.
70
Let's go back to all data
71
and look now at how we can ask the database to only return specific rows in the result.
72
To do this we use a WHERE clause with different operators.
73
For example, we could select only players with a weight of 190 pounds.
74
So we use the equals operator.
75
We could also select any player with a weight greater than 190 pounds or greater than or equal to 190.
76
You see, it's not that complicated.
77
And we've gone from over 11 ,000 records to just under 1 ,000 being returned.
78
We can also specify more than one condition by using either
79
and or or so weight greater than 190 and height greater than 190
80
so both conditions must be met if I change it to
81
or it means that either condition must be met in order for the row to be returned
82
so that's selecting rows based on the value in integer fields what about when it comes to text values?
83
Well, we can also use the equals operator to find any row where the text matches exactly with what we specify.
84
PlayerName equals Aaron Galindo.
85
But we could also use the like operator which achieves the same goal.
86
But what if we want to select just rows from all players called Aaron?
87
So basically the player name field starts with Aaron.
88
Here we can use a percent character after the text to look for, like so.
89
And we get all Arons returned.
90
If we wanted to find any player name that ends with Aaron, we put the percent character before.
91
Nothing that ends with Aaron.
92
We could put a percent before and after, which would basically mean any player name that contains Aaron.
93
And we've got Rolando Arons.
94
Finally, here's an example which puts the percent in the middle of text.
95
So here we'll return all rows where the player name starts with a and ends with n.
96
you can go even further with the like operator by using
97
underscore to represent single characters an example would be like t underscore m percent
98
so the underscore is asking for any rows where the player name starts with t
99
then any character between the t and the m followed by anything and run.
100
We've got Tamas, Tamir, Tim, Timmy, etc.
101
There are also things called wildcards that allow you to go even further
102
when specifying the rows you want to return but we won't go into those for this video.
103
We will however finish looking at the where clause by talking about a couple more operators that you can use.
104
For text fields we have in which allows us to specify multiple or statements, more simply.
105
However, it can only be used for exact matches, so we can't use percents or underscores with it.
106
So let's look for Ronaldo and Messi.
107
Open brackets Cristiano Ronaldo, Lionel Messi.
108
For integers, we can use the between operator.
109
So I could say wear weight between 180 and 190.
110
Finally we have the isNull and isNotNull.
111
Null being empty.
112
In this table we don't have any null values.
113
But if I open up the match table we can see that there are lots in there.
114
So select star from match where home player 1 is null. or is not null.
115
There we go.
116
Let's go back to our player table and see how we can sort results.
117
We can do this using the ORDER BY clause.
118
The rows are currently sorted by the ID field in ascending order.
119
But if we wanted to sort by weight, we can say ORDER BY WAIT.
120
This sorts by weight in ascending order, because that's the default sorting method when not explicitly specified.
121
But we can change this to descending order by adding DESC now we can see who the heaviest player is
122
when it comes to sorting data using order by this isn't something that's overly important for our use case
123
because when we're selecting data to create views we're usually then going to connect
124
that view to a bi tool and use
125
that for building individual chart queries
126
and these tools will let you apply sorts to the data
127
now we're going to look at how to join data from different tables.
128
To demonstrate this I'm going to use the player attributes table.
129
We can see that in this table we have the player ID but not the player name.
130
To be able to create a view containing the player name plus the overall rating
131
we would need to join the data from the player attributes and player tables.
132
I'm going to start by specifying player API ID comma date comma overall rating.
133
Now I want to get the player name from the player table.
134
How do I do that?
135
Well because we're going to need fields from two different tables we need to specify which field comes from which table.
136
We do this by writing the table name dot field name.
137
So player attributes dot player API ID.
138
Same for date and overall rating.
139
Now we can specify, perhaps after the player ID, player dot player name.
140
If I run this I'll get an error saying
141
that there's no such column as player .playerName because we're saying that we're looking for it in the player attributes table.
142
This is when we need to specify the joining of the tables using one of the four join types.
143
I'm not going to go into them in this video
144
but I'll probably do a separate video that explains them in more detail so don't forget to subscribe.
145
So in this case we'll use an inner join
146
and we'll say inner join player the player table on
147
and now we specify what fields
148
we want to use to create the join in this case we're going to use the player api id field
149
which is contained in both tables
150
and again we have to add the table name first dot field name equals player dot player API ID and run.
151
Now we have the player name appended to the player attributes table data.
152
Pretty clever right?
153
But let me show you something even more clever.
154
I showed you earlier how to use the as function to create aliases for fields.
155
Well we can actually do this for tables as well which makes the query much cleaner.
156
First I'm going to give the player attributes table an alias of a and the player table an alias of b.
157
I just need to write these two letters after where I've specified each table.
158
So a after player attributes here and b after player here.
159
Once I do this I can now replace the table name for each field like this.
160
You see, much cleaner.
161
So, you may notice that there are multiple rows for each player on different dates.
162
So how would we add up all of these different values for each player?
163
Well, to do this, we're going to want to aggregate the data using the SUM aggregator.
164
I'll add this to the overall rating field and run the query.
165
Ah, that's not what we were expecting.
166
But that's because we haven't specified in the query how we want to group the data together.
167
This is when we need to use the GROUP BY clause.
168
When we use the GROUP BY clause we need to add into it all of the fields that we need to group.
169
So in this case essentially all fields apart from the overall rating.
170
A .PlayerApiId, B .Playername, A .Date And run
171
This is correct, but not exactly what we want.
172
We want to combine all of the ratings for the different dates,
173
so we actually want to remove the date field from the specified fields as well as the group by. and run.
174
That's better.
175
But let's clean it up by aliasing the sum overall rating as rating.
176
Let's sort this descending.
177
Order by rating descending.
178
Strange that Ronaldo and Messi aren't in there at the top.
179
Let's try and see why this is.
180
Perhaps there are just more entries for some players when we sum them up.
181
To find this out, we could add a count of b .playerName.
182
And yes, in this case how about using an average?
183
I'll replace sum with average, avg, and run.
184
And there we go, that makes more sense.
185
We're going to go one step further and filter this result.
186
To do that we can use the HAVING clause.
187
The HAVING clause is only applied to the result of the GROUP BY function, so isn't the same as the WHERE keyword that's applied before.
188
And it's only applied to numeric values, so in this case I'm going to ask for only ratings above 85.
189
I need to write it directly after the group by and before the order by.
190
So having rating greater than 85 and run.
191
Only 26 records.
192
And there we have our final query.
193
I'll beautify it and this is what it should look like.
194
You can see that all of the SQL keywords are capitalised.
195
And you can see that we've come a fairly long way in a very short space of time.
196
We've only covered a very small part of SQL as a whole, so there's masses more to learn.
197
But what I've shown you today is a really good foundation for giving you the confidence to dive deeper.
198
Did I not say that once we'd finished, you'd wonder what all the fuss was about?
199
If you got value out of this video, please do like, share
200
and subscribe for more videos like this one why not start with this playlist here as always thanks for watching
201
I've been Adam Feiner and until the next time stay BI curious

앱 다운로드

유창하게 말하는 데 필요한 모든 것

AI 발음 평가문장마다 점수 확인
IPA 발음 연습모든 소리 마스터
단어 학습나만의 단어장 만들기
단어 게임놀면서 외우기
FOR YOU

추천 영상

이 레슨의 어휘와 말하기 포인트

이 말하기 레슨은 영상 “Learn Basic SQL in 15 Minutes”을(를) 바탕으로 합니다. 가장 자주 반복되는 단어는 다음과 같습니다: player, table, field, row, select. 이 영상에는 섀도잉할 문장 201개와 단어 2466개가 있습니다. 말하는 구간의 길이는 17:28입니다. 화자는 분당 약 141단어의 일정한 속도로 말해서 섀도잉하기에 편한 속도입니다. 단어의 84%가 영어에서 가장 많이 쓰이는 3,000단어에 속합니다. 나머지는 연습 전에 미리 확인해 두세요.

이 영상의 핵심 어휘

영상에 나오는 익혀 둘 만한 단어 15개를 발음, 뜻과 함께 정리했습니다.

단어발음뜻
query 명사/ˈkwɪɹ.i/질문
select 동사/sɪˈlɛkt/고르다
database 명사/ˈdeɪtəˌbeɪs/데이터베이스
rat 명사/ɹæt/쥐
operator 명사/ˈɑpəˌɹeɪtɚ/조작자, 오퍼레이터
attribute 명사/ˈæt.ɹɪˌbjut/속성, 특질
connect 동사/kəˈnɛkt/잇다, 연결하다
subscribe 동사/səbˈskɹaɪb/구독하다
chart 명사/t͡ʃɑɹt/차트, 도표
rating 명사/ˈɹeɪtɪŋ/순위, 레이팅
filter 명사/ˈfɪltɚ/여과기, 필터
interface 명사/ˈɪn(t)ɚˌfeɪs/인터페이스
sequel 명사/ˈsiːkwəl/후편, 속편
soccer 명사/ˈsɑk.ɚ/축구, 풋볼
complicated 형용사/ˈkɑm.plɪˌkeɪ.tɪd/복잡하다

따라 말해 볼 만한 문장

영상에 나오는 짧고 완결된 문장으로, 일상 대화에서 그대로 쓸 수 있습니다:

  • Let's jump onto my computer and get started.
  • In terms of the tool I'm using to query the database?
  • You see, it's not that complicated.
  • In this table we don't have any null values.
  • How do I do that?

이 영상의 문법

화자가 가장 많이 쓰는 문형을 영상 속 실제 표현과 함께 정리했습니다.

문형영상 속 표현
조건문 if + 절, will/would + 동사 — 조건과 그 결과If I double click it we'll see · If I run this I'll get
현재완료 have/has + 과거분사 — 과거의 일이 지금도 관련이 있을 때I've created · i've written · have been capitalized
수동태 be + 과거분사 — 누가 하는지보다 무슨 일이 일어나는지에 초점might be called · are often called · have been capitalized
“might / may” 가능성 might/may + 동사 — 가능하지만 확실하지 않은 일might be · might want · may notice

주의할 발음

화자는 we're, I'm, I'll 같은 축약형과 약화된 형태를 70번 사용합니다. 들리는 대로 짧게 발음하세요.

  • “sh”와 “zh” 소리: efficient /ɪˈfɪʃənt/, essentially /ɪˈsɛnʃəli/, dashboard /ˈdæʃˌboɹd/
  • 긴 단어 — 강세 위치에 주의: operator /ˈɑpəˌɹeɪtɚ/, complicated /ˈkɑm.plɪˌkeɪ.tɪd/, essentially /ɪˈsɛnʃəli/, aggregator /ˈæɡɹɪˌɡeɪtɚ/, capitalize /ˈkæpətəˌlaɪz/

한국어 화자가 어려워하는 소리:

  • /f/ — ㅍ(/p/)으로 바꾸지 말고 윗니를 아랫입술에 대기: specify /ˈspɛs.əˌfaɪ/, filter /ˈfɪltɚ/, interface /ˈɪn(t)ɚˌfeɪs/, fuss /fʌs/, efficient /ɪˈfɪʃənt/
  • /v/ — ㅂ(/b/)과 구별하기: clever /ˈklɛv.ɚ/, sensitive /ˈsɛn.sɪt.ɪv/, dive /daɪv/
  • /z/ — ㅈ이 아니라 성대를 울리는 /s/: clause /klɔːz/, columns /ˈkɑləmz/, capitalize /ˈkæpətəˌlaɪz/

이 영상으로 연습하는 방법

  1. 먼저 말하지 않고 영상을 끝까지 듣고 모르는 단어를 적어 둡니다.
  2. 보통 속도로 한 문장씩 섀도잉하고, 화자의 리듬과 맞을 때까지 반복합니다.
  3. 자신의 목소리를 녹음해 원본과 비교하고, query, select, database 같은 단어에 특히 주의합니다.

쉐도잉이란? 영어 실력을 빠르게 키우는 과학적 방법

쉐도잉(Shadowing)은 원래 전문 통역사 훈련을 위해 개발된 언어 학습 기법으로, 다언어 학자인 Dr. Alexander Arguelles에 의해 대중화된 방법입니다. 핵심 원리는 간단하지만 매우 강력합니다: 원어민의 영어를 들으면서 1~2초의 짧은 지연으로 즉시 소리 내어 따라 말하는 것——마치 '그림자(shadow)'처럼 화자를 따라가는 것입니다. 문법 공부나 수동적인 청취와 달리, 쉐도잉은 뇌와 입 근육이 동시에 실시간으로 영어를 처리하고 재현하도록 훈련합니다. 연구에 따르면 이 방법은 발음 정확도, 억양, 리듬, 연음, 청취력, 말하기 유창성을 크게 향상시킵니다. IELTS 스피킹 준비와 자연스러운 영어 소통을 원하는 분들에게 특히 효과적입니다.

섀도잉 방법: 단계별 전체 가이드 읽기 →