Would you like to inspect the original subtitles? These are the user uploaded subtitles that are being translated:
0
1
00:00:00,460 --> 00:00:09,550
To practice on joins will be creating a separate data set of two tables, let us see how to create
1
2
00:00:09,550 --> 00:00:10,360
these two tables.
2
3
00:00:11,230 --> 00:00:19,570
The first table will be from the sales table, and it will contain only those records where ship date
3
4
00:00:20,410 --> 00:00:25,870
lies between 1st January 2015 and 21st December 2015.
4
5
00:00:27,580 --> 00:00:36,330
So this table will be named as sales_2015 as this sales of year 2015. The second table
5
6
00:00:36,340 --> 00:00:41,550
we are creating is of customers whose ages between 20 and 60.
6
7
00:00:41,860 --> 00:00:49,150
The name of this table will be customer_20_60, and it will be part of the customer table were
7
8
00:00:49,150 --> 00:00:52,390
aged between 20 and 60. For the first table
8
9
00:00:52,390 --> 00:00:58,770
The count of rows will be 2131. This you can check by running this check query.
9
10
00:00:59,790 --> 00:01:09,120
And the number of distinct customers were purchasing in year 2015 is 578, This you can check using this second count
10
11
00:01:09,480 --> 00:01:18,410
query in our customer table where customers are aged between 20 and 60, the count of customers is 597.
11
12
00:01:19,200 --> 00:01:22,650
Some of the customers will be presenting both the tables.
12
13
00:01:23,370 --> 00:01:27,930
Some will be present in only sales table and not in the second customer table.
13
14
00:01:28,320 --> 00:01:31,290
Some will be present in the customer table and not in sales table.
14
15
00:01:33,190 --> 00:01:38,860
This is what we wanted to create so that we can clearly see the difference between all these types of
15
16
00:01:38,860 --> 00:01:46,120
joins, I'm copying these two queries into a text file and attaching it to the resources section of
16
17
00:01:46,120 --> 00:01:46,900
the lecture.
17
18
00:01:47,410 --> 00:01:49,870
You can copy paste these queries to run them.
18
19
00:01:51,730 --> 00:01:56,830
I'm not discussing these queries in depth because we have not discussed subquery, which will be in
19
20
00:01:56,830 --> 00:01:58,030
the later part of this course.
20
21
00:01:58,700 --> 00:02:00,820
Next, we will discuss the inner join.
2352
Can't find what you're looking for?
Get subtitles in any language from opensubtitles.com, and translate them here.