All language subtitles for 2. Case Study Part 2 - How SQL is Used

af Afrikaans
sq Albanian
am Amharic
ar Arabic
hy Armenian
az Azerbaijani
eu Basque
be Belarusian
bn Bengali
bs Bosnian
bg Bulgarian
ca Catalan
ceb Cebuano
ny Chichewa
zh-CN Chinese (Simplified)
zh-TW Chinese (Traditional)
co Corsican
hr Croatian
cs Czech
da Danish
nl Dutch
en English
eo Esperanto
et Estonian
tl Filipino
fi Finnish
fr French Download
fy Frisian
gl Galician
ka Georgian
de German
el Greek
gu Gujarati
ht Haitian Creole
ha Hausa
haw Hawaiian
iw Hebrew
hi Hindi
hmn Hmong
hu Hungarian
is Icelandic
ig Igbo
id Indonesian
ga Irish
it Italian
ja Japanese
jw Javanese
kn Kannada
kk Kazakh
km Khmer
ko Korean
ku Kurdish (Kurmanji)
ky Kyrgyz
lo Lao
la Latin
lv Latvian
lt Lithuanian
lb Luxembourgish
mk Macedonian
mg Malagasy
ms Malay
ml Malayalam
mt Maltese
mi Maori
mr Marathi
mn Mongolian
my Myanmar (Burmese)
ne Nepali
no Norwegian
ps Pashto
fa Persian
pl Polish
pt Portuguese
pa Punjabi
ro Romanian
ru Russian
sm Samoan
gd Scots Gaelic
sr Serbian
st Sesotho
sn Shona
sd Sindhi
si Sinhala
sk Slovak
sl Slovenian
so Somali
es Spanish
su Sundanese
sw Swahili
sv Swedish
tg Tajik
ta Tamil
te Telugu
th Thai
tr Turkish
uk Ukrainian
ur Urdu
uz Uzbek
vi Vietnamese
cy Welsh
xh Xhosa
yi Yiddish
yo Yoruba
zu Zulu
or Odia (Oriya)
rw Kinyarwanda
tk Turkmen
tt Tatar
ug Uyghur
Would you like to inspect the original subtitles? These are the user uploaded subtitles that are being translated: 1 00:00:01,080 --> 00:00:05,880 The first thing the analyst must know is the database and the data stored in it. 2 00:00:07,070 --> 00:00:10,980 Now our company is storing data in three tables. 3 00:00:11,790 --> 00:00:14,910 First is the customers table in this table. 4 00:00:14,940 --> 00:00:22,140 Each registering customer is assigned a unique customer ID and against this ID, all other customer 5 00:00:22,140 --> 00:00:27,690 details such as customer name, age, city, state of residence, etc. are being stored. 6 00:00:28,620 --> 00:00:30,270 Second is the products table. 7 00:00:30,720 --> 00:00:36,360 In this table, our supply chain team maintains a list of all products we are selling. 8 00:00:37,310 --> 00:00:38,150 With this. 9 00:00:38,240 --> 00:00:42,140 They also stored the name, subcategory and category of each product. 10 00:00:43,670 --> 00:00:47,540 Each product is also assigned a unique ID called Product ID. 11 00:00:49,660 --> 00:00:52,390 Third is the transaction table or the sales table. 12 00:00:53,220 --> 00:00:55,530 All its transactions are stored into it. 13 00:00:56,530 --> 00:01:01,660 It has product ID of product being sold, it has customer ID of customer who is buying it. 14 00:01:02,830 --> 00:01:08,740 And it has other details such as order, date, ship, date, selling, price and discount, etc.. 15 00:01:09,130 --> 00:01:11,380 Let us go and look at these tables first. 16 00:01:12,680 --> 00:01:13,760 The first query. 17 00:01:17,400 --> 00:01:19,530 Get the result in the window below. 18 00:01:21,420 --> 00:01:29,010 The customer table as this structure in the columns, it has column ID, column name, segment, age, 19 00:01:29,010 --> 00:01:33,240 country, city, state, postal code and the region. 20 00:01:34,590 --> 00:01:35,610 In the rose. 21 00:01:35,610 --> 00:01:38,670 It has all the records of different customers. 22 00:01:40,050 --> 00:01:41,820 Let us look at the product table. 23 00:01:44,790 --> 00:01:49,230 It has only four columns product ID, category subcategory and the product name. 24 00:01:49,680 --> 00:01:52,680 And each product is in the different rows. 25 00:01:53,970 --> 00:01:57,330 That's the third query to look at the sales table. 26 00:01:59,260 --> 00:01:59,930 In this exhibit. 27 00:02:00,010 --> 00:02:02,620 We have lots of rows and columns. 28 00:02:04,000 --> 00:02:10,150 In the columns you can see we have customer ID also, this is the ID of customer who is ordering it. 29 00:02:10,690 --> 00:02:12,520 We have product ID also. 30 00:02:12,550 --> 00:02:14,620 This is the product being ordered. 31 00:02:15,560 --> 00:02:22,880 We have other details, such as sales value, quantity ordered, discount given and the profit earned. 32 00:02:23,240 --> 00:02:26,330 Now, let us see if we can answer the questions of our colleagues. 33 00:02:27,140 --> 00:02:32,660 Now, the marketing manager is asking us to provide the number of customers belonging to the three age 34 00:02:32,660 --> 00:02:34,850 groups in all the four regions. 35 00:02:35,420 --> 00:02:38,870 To do this, I have this query written. 36 00:02:40,100 --> 00:02:41,600 If I run this query. 37 00:02:43,380 --> 00:02:44,790 I get the following result. 38 00:02:46,100 --> 00:02:53,270 You can see that in every region except south Category two as the maximum count. 39 00:02:54,530 --> 00:03:03,350 These are the people between the age of 36 to 54, whereas in south category three has maximum count. 40 00:03:04,310 --> 00:03:11,120 So marketing managers can now choose appropriate marketing channel in South region to focus on customers 41 00:03:11,270 --> 00:03:15,800 who have more than 56 years of age in all the three other regions. 42 00:03:16,070 --> 00:03:20,900 The marketing manager can go ahead with a common marketing channel aimed at middle aged customer. 43 00:03:22,280 --> 00:03:25,460 Let us see what ops manager is asking us. 44 00:03:25,940 --> 00:03:31,190 He wants to find out the top selling products of East and least selling products of South Region. 45 00:03:32,140 --> 00:03:33,610 So we go to the database. 46 00:03:35,080 --> 00:03:37,630 I will write and run the corresponding queries. 47 00:03:39,080 --> 00:03:41,630 First to get the top selling products of East. 48 00:03:41,660 --> 00:03:43,640 We run this query. 49 00:03:45,970 --> 00:03:50,230 You can see these are the top five selling products of East region. 50 00:03:51,930 --> 00:03:57,900 The operations manager should be ordering these five products since these are high selling products 51 00:03:57,900 --> 00:03:58,920 in the East region. 52 00:03:59,950 --> 00:04:04,480 Now let us run the second query to find out the least selling products of South. 53 00:04:07,410 --> 00:04:11,430 We can see that these are the five products with minimum sales. 54 00:04:12,270 --> 00:04:19,200 The operations manager can recall these products to make some space in the South warehouse. 55 00:04:21,640 --> 00:04:24,580 Next, let us see what finance manager is asking us. 56 00:04:25,650 --> 00:04:32,700 He wants the total revenue loss from discounts and the comparison of discounts given versus revenue 57 00:04:32,700 --> 00:04:34,500 generated by each product. 58 00:04:35,940 --> 00:04:38,790 So we write the corresponding query and run it. 59 00:04:39,600 --> 00:04:42,030 If I select this first query and run it. 60 00:04:44,510 --> 00:04:52,730 We get that 322,000 units is the total revenue loss because of the discount given. 61 00:04:54,530 --> 00:04:56,570 When I select and run the second query. 62 00:04:59,280 --> 00:05:03,300 We find out the sales of each product in the revenue column. 63 00:05:04,470 --> 00:05:08,370 We find out the discount given for each product in the discount column. 64 00:05:09,180 --> 00:05:09,590 Indeed. 65 00:05:09,600 --> 00:05:10,560 Each of these two. 66 00:05:11,340 --> 00:05:18,360 I've ordered it in the descending order of this ratio, which means that for the first product, we 67 00:05:18,360 --> 00:05:22,410 have given four times the discount than the revenue it has generated. 68 00:05:24,060 --> 00:05:29,970 Similarly, the situation with the next few product where we have given more discount than the revenue 69 00:05:29,970 --> 00:05:37,590 that particular product was generating, the finance manager needs to study these products and decide 70 00:05:37,620 --> 00:05:44,040 either to raise the price of these products or to discontinue the coupon or to discontinue the sale 71 00:05:44,040 --> 00:05:45,420 of this product altogether. 72 00:05:46,470 --> 00:05:52,860 You can see that by writing these few lines, which seem to be in simple English language, you are 73 00:05:52,860 --> 00:05:55,740 able to get meaningful information out of your data. 74 00:05:56,550 --> 00:06:02,700 We will learn everything about these queries in the videos to come, and I assure you that it is simple 75 00:06:02,700 --> 00:06:06,600 and you will be able to write complex queries after completing the course. 76 00:06:07,560 --> 00:06:13,320 But before starting with query straightaway, let's first learn some basic theory of data management. 77 00:06:14,430 --> 00:06:15,150 For this. 78 00:06:15,630 --> 00:06:17,190 See you in the next section. 7629

Can't find what you're looking for?
Get subtitles in any language from opensubtitles.com, and translate them here.