background top icon
background center wave icon
background filled rhombus icon
background two lines icon
background stroke rhombus icon

Download "Уроки SQL для начинающих / #7 - Объединение данных"

input logo icon
Video tags
|

Video tags

join sql
inner join
left join sql
right join sql
database
sql
sql для начинающих
server
mysql
бд
база данных
субд
рсубд
sqlite
postgresql
программирование
sql уроки
sql server
Subtitles
|

Subtitles

subtitles menu arrow
  • ruRussian
Download
00:00:02
about combining data from various
00:00:04
tables, but first I want to
00:00:07
recommend the site these Prager.
00:00:09
on this site you will find a video course here,
00:00:11
as well as homework, ready-made code and
00:00:13
a lot of other useful information, a link
00:00:15
to this lesson will be in the description of this
00:00:17
video,
00:00:18
and so the first thing we will do is
00:00:19
go to the shop sign
00:00:21
and here we will add a few new entries
00:00:23
and register them in In principle,
00:00:25
you can even click on insert, it
00:00:27
will add everything to us as if it were standard, the whole
00:00:31
standard syntax, and all that we don’t
00:00:32
have to register is just the
00:00:35
only value, and I’ll delete the idea because it’s
00:00:37
automatically added to us here. I
00:00:39
’ll register, for example, the first product, this
00:00:41
will be a little wrong for us iphone
00:00:44
for example, the price is 300, and in addition
00:00:47
we will write down several of these simple
00:00:49
start values, more and more and more and more,
00:00:53
so let’s just let us have, for
00:00:55
example, goods and here we’ll just change it, for
00:00:58
example, it will be tewi,
00:00:59
it will be for example is-4, it will be mac, we will have it, for
00:01:03
example refrigerator
00:01:07
refrigerator and we will have this, let's
00:01:10
phone 7 here we will also change the prices 320
00:01:13
here 30 here for example
00:01:16
15 here just 10 well and here for example
00:01:20
23 here we press forward and here we have all
00:01:24
this data added here we have
00:01:27
several products that is now we have we
00:01:29
have, as it were, two apple tablets, it contains
00:01:32
just users and also there
00:01:34
is no just goods, the indicated name is
00:01:37
indicated, the price is indicated,
00:01:38
now we need to add orders,
00:01:41
orders from us will be the following, that is,
00:01:44
again, we will also indicate insert here
00:01:46
right away, about a single one, there is no need to install it it’s
00:01:49
automatically installed, but
00:01:51
also daytime, we don’t even need to
00:01:53
install it, it’s also automatically
00:01:54
installed every time, it’s
00:01:56
just the time that
00:01:58
is right now, but
00:02:00
we need to install everything else, and here, in
00:02:02
fact, we’re doing the following with you
00:02:04
separately, it’s just an order number in
00:02:07
principle, it can be anything, well, in
00:02:09
our case, it’s really an integer, so
00:02:11
let’s, for example, write something like this:
00:02:13
0 0 0 1 that is, our very first
00:02:15
order further shop id is essentially an id,
00:02:20
but I opened several scarves, all the
00:02:23
signs are this in fact, the ID of the product with
00:02:26
which it was purchased, let’s say 1
00:02:29
product was purchased from us by Tivi
00:02:30
from, respectively, here I indicate 2
00:02:33
because he has two legs,
00:02:35
you’ll get tired of it, find this is the person
00:02:37
who bought this launch from us,
00:02:40
let’s give this Ivan to correct it is an
00:02:42
eyesore, this is the person who
00:02:44
bought us, then let him have a bob, here he has
00:02:47
aide 4, which means that this means that
00:02:50
here we put 4, that is, in fact, in
00:02:52
this entry we say that this is our
00:02:54
first sale of the product that we sold
00:02:57
this from us TV and the person who
00:02:59
bought it from us is a bean. In the future,
00:03:03
thanks to data merging, we will be able to
00:03:06
combine all the data from this table in principle
00:03:10
to get only those users
00:03:12
who bought there, for example, certain
00:03:14
values,
00:03:15
but we haven’t gotten to that yet, let’s
00:03:17
just write down a few of these for now
00:03:20
as if there were orders, let’s say there
00:03:22
will be several of us here, let’s indicate for example 4
00:03:24
this was bought first here bought 5
00:03:27
bought here 3 let’s buy here 2 I don’t
00:03:30
look anymore and what goods were purchased here,
00:03:33
but I don’t think we all exist,
00:03:36
so let’s write them down in a similar way,
00:03:38
the only thing is let’s also let's
00:03:40
write something down, for example, there will be two here, we'll indicate
00:03:42
that there are 4 5 bought here is an example, let it be like this
00:03:46
at the end; forward and now all the
00:03:49
data has been added,
00:03:51
such a sign does not make any sense,
00:03:53
but at the same time, if you and I
00:03:56
point, for example, at these
00:03:59
numbers, for example, at a deuce four, then
00:04:02
further on these shop go, then you and I,
00:04:05
by the way, and Jane ombre the report is the
00:04:08
same everywhere it was delivered, let's
00:04:10
fix it quickly, not that we need this
00:04:12
parameter, but at the same time, let
00:04:14
everything be beautiful, so let's do it like this,
00:04:17
look, if I point to these
00:04:19
links, we are immediately shown, as
00:04:21
if in essence,
00:04:23
the name of that product which
00:04:26
we purchased, look tyvi here
00:04:28
indicate relish here 5 tivi are indicated here
00:04:30
2 out of 4 are indicated and here for
00:04:33
example an iphone
00:04:35
well now it seems like an iphone and if
00:04:37
we point here it will just be a person
00:04:39
indicated bob for example [ __ ] Peter and so on
00:04:43
very very convenient while this
00:04:45
the plate does not make any sense to us,
00:04:47
but thanks to the combination of data,
00:04:50
we will be able to display all orders for, for
00:04:52
example, a specific user,
00:04:53
accordingly, let’s make such a cross by you
00:04:56
and write it down for this, go to excel and
00:04:58
write the command,
00:04:59
write select, then we say which fields
00:05:02
we want to select, I don’t want the
00:05:04
selected one to be absolutely all the fields are according to
00:05:06
this god, so it’s better to write down such fields I want to
00:05:08
select, I indicate that I select an
00:05:11
address from the plate and a field like order
00:05:14
number,
00:05:15
also additionally I take the people plate and
00:05:18
from it I take, for example, a name and
00:05:21
in addition we can
00:05:24
also take from people had let it be enough after
00:05:27
all, the parameters we need, then we say
00:05:30
from which table we generally select the
00:05:32
data. In our case, I select the data
00:05:34
from the bible table, so I’ll
00:05:38
just merge and check the data with the
00:05:43
door sign like this, then
00:05:44
we’ll
00:05:48
just write a new line, we’ll use
00:05:49
the union data, which is called
00:05:52
inner join,
00:05:53
there are several types of
00:05:55
data combination. Now we will look at the
00:05:57
inner join in a joint that allows
00:05:59
us to check the data,
00:06:02
that is, for example, in our case,
00:06:03
check the data from the people s plate and the
00:06:06
impact plate, but if certain data there
00:06:10
coincides, then this here the fields will be
00:06:12
displayed on such as records and
00:06:14
will be displayed in which the fields will
00:06:16
coincide
00:06:17
in words it’s difficult let’s better write
00:06:19
now look we write he further we
00:06:22
speak and by ID
00:06:24
equals codgers I’m sorry I use
00:06:28
phryges he ID that is
00:06:30
what I prescribed I prescribed the fact
00:06:33
that I select fields such as genie
00:06:36
amber apple name and people i may
00:06:38
had from the table called
00:06:41
people and combine this data from with and the
00:06:45
address table and it turns out that
00:06:48
only those records will be displayed in which people
00:06:52
ID is equal to
00:06:54
the order Spears find that is, by essentially in
00:06:57
which this plate in which these
00:07:00
disks will be equal to a second these are my
00:07:05
cheap ones, that is, for example, for the first
00:07:07
user this entry will be displayed
00:07:10
ok the only thing I suggest
00:07:12
adding is
00:07:13
adding sorting by this code
00:07:16
buy here we indicate the address let the
00:07:20
address order number and indicate
00:07:23
the only thing that is the disk, well, that is, in
00:07:25
descending order, press forward and now
00:07:28
we have displayed all the records we need.
00:07:32
Now we have received data from
00:07:35
two plates from the address plate and also
00:07:38
from the people plate.
00:07:39
Now we have information about the
00:07:42
order number and also about the person who
00:07:44
made this order,
00:07:45
let's change the search a little and
00:07:48
in addition you see the name of the product
00:07:50
that the user bought, to
00:07:53
do this we need to, here we have the
00:07:55
number address and I think it will be
00:07:58
launched and we will probably delete it altogether,
00:08:00
we will turn to shock and there let's choose
00:08:03
such a thing as an idol, that is, we
00:08:06
will simply get the name of the product and the name of the
00:08:09
product and the name of the person who
00:08:12
bought this product without sleeping,
00:08:14
then we just need to
00:08:17
combine the signs again, now we
00:08:20
also combine with the shock sign, here we indicate the shock
00:08:24
ID, well, that is, where the shop ID is equal shock leader
00:08:29
where it turns out shock leaders but the address.
00:08:32
shop go here and if you and I
00:08:37
basically run this forward, click then we
00:08:40
get the user, that is, a
00:08:42
specific user and what exactly
00:08:45
he bought, in addition we can display the
00:08:47
order number, we can display the price, well, we can display
00:08:50
all the information we want, but
00:08:51
we can now display the main thing
00:08:54
combine data from several tablets
00:08:57
and display them at once, and now we
00:09:00
also have a completely logical and informative
00:09:03
conclusion, that is, we know which
00:09:05
user bought what and we can
00:09:08
also display, for example, which one is at fault,
00:09:10
how many times, but this was bought,
00:09:13
for example, toyz, we will have such, for example,
00:09:15
there are additional fields from this, which is already
00:09:17
quite convenient at the moment, we
00:09:20
have studied with you
00:09:21
inner join in each Chuyan, this is essentially a
00:09:23
method of combining when it doesn’t
00:09:27
matter to us which table we
00:09:29
take the data from and compare them, that is,
00:09:32
in essence we we can take the data from
00:09:34
the table about Darcy from the shock table and
00:09:36
compare them as we
00:09:38
please, for example, how people compared this case here and the
00:09:40
bear's shop
00:09:42
address, and so on I can do it in some
00:09:44
other way and compare it as we
00:09:46
please here
00:09:47
energy and is used most often,
00:09:50
but additionally they also use
00:09:53
other methods of combining such as lion
00:09:55
join and also earlier he joked left and
00:09:58
right joy are the same union, but they
00:10:02
differ in that we take data,
00:10:04
for example, from the left plate, so to speak,
00:10:07
or from the right plate, since without 1
00:10:10
scaffolding 2 signs, well, initially,
00:10:12
for example, we take from the first sign, we don’t
00:10:14
compare it with the second sign, okay, this is how it’s
00:10:17
written, let’s
00:10:18
initially write down the elevator join and joint, it’s
00:10:22
written as follows, to
00:10:23
begin with, we take with you, for example, the spider,
00:10:26
well, that is, by decree which are simple we take
00:10:27
polar examples of the people name and
00:10:29
additionally assuming there will be Rogers
00:10:32
ups apc so once again allers that it’s
00:10:38
impossible to write the address 1 ampere and in
00:10:42
addition probably probably all we
00:10:45
really don’t need anything else
00:10:46
purely for the example of this best white
00:10:48
then we say that we take all the data
00:10:50
from the people table
00:10:52
and then say that we are their volume
00:10:55
using left join,
00:10:57
here we indicate the table with
00:11:00
which we are working, in our case it
00:11:02
will be the address table and we say to
00:11:05
we carry out the check, the check
00:11:07
will be as follows: this is apple.
00:11:10
go equally about jersey.
00:11:13
person ID, but in addition, I’ll also immediately
00:11:16
write a buy order here, for example, we’ll write
00:11:20
Pavel.
00:11:22
let . name, for example, we will sort by name
00:11:24
and we will even indicate the disk,
00:11:26
perhaps explain what lion join and
00:11:28
other joint are, and the easiest way is with the help of
00:11:31
this picture, look, here we use
00:11:33
with you in or join and
00:11:35
or john, it allows you to take only those
00:11:38
data that are, as it were, general Lev
00:11:41
John allows you to take data from, for example,
00:11:43
tablets from which we initially
00:11:45
select everything, that is, tablets for example
00:11:46
people wright join from a tablet from
00:11:51
which we sort of check and outer
00:11:53
join
00:11:54
this, in principle, this method of combining
00:11:57
allows you to take absolutely everything all
00:12:00
all the data is the very hour the pumpkin is used,
00:12:03
this is the inner join,
00:12:04
if I now run this, for
00:12:07
example, forward tons, in fact, you and I did
00:12:09
n’t even notice anything special,
00:12:12
everything is output in exactly the same way and works in
00:12:16
exactly the same format, the only thing that you
00:12:18
and I we just received
00:12:20
absolutely all the data, for example from a
00:12:21
sign, and not all the data is complete, for example,
00:12:24
the picture of the sign, we can additionally
00:12:28
write join with you again, in principle,
00:12:30
this is the same thing, that is, we can
00:12:34
write select with you, then we will indicate that
00:12:36
this is the address of the descent and smoke and additional
00:12:40
Yes, let it be half,
00:12:41
I apologize, and full, so then we
00:12:46
say that we take it all from the tablet,
00:12:48
in this case, the address of this country is already from the tablet
00:12:51
through the people tablets,
00:12:52
but now we shouldn’t take the address from the tablet so
00:12:55
that all the data is
00:12:57
taken from us people signs
00:12:59
because we use with you exactly
00:13:00
love me right joy toy joy he takes
00:13:03
exactly the data not from the from sign from which
00:13:07
we are working here, as it were, but from
00:13:09
another sign with which we compare,
00:13:11
that is, from there he will take all the data,
00:13:13
and here we are we simply indicate right
00:13:15
join,
00:13:17
then we say with which sign with the
00:13:20
people sign,
00:13:21
then we say he and here
00:13:24
we indicate codgers.
00:13:27
forsen 1 is equal to apple apple
00:13:32
id again, you can add more
00:13:36
sorting I won’t do anymore, just
00:13:38
click forward and in principle we get
00:13:40
approximately the same thing, that is, this is the time, the
00:13:41
address is taken from the sign and the name is
00:13:44
taken from the people sign, this is
00:13:45
how it is implemented in principle
00:13:47
combining data
00:13:49
the most common way is combining data
00:13:52
using inner join and because we just
00:13:56
at the very beginning looked at it and
00:13:58
looked at it using the example of taking data
00:14:00
not just from one plate from
00:14:02
several plates at once, in our case it
00:14:04
will be the apple address plates and also a show
00:14:06
on this Our video lesson is coming to an end,
00:14:08
so subscribe to the channel,
00:14:10
join the VKontakte group and also
00:14:12
go to the Aiki Prager website. Who are
00:14:14
all the links in the description of this video,
00:14:16
see you soon

Description:

Для объединения данных из нескольких таблиц используются Joint'ы. В ходе урока вы изучите несколько способов объединения данных: Inner Join, Left Join и Right Join. 1) Урок на сайте itProger: https://itproger.com/course/sql/7 ✔ Сообщество программистов: https://itproger.com/ ✔ ------------- Вступай в группу Вк - https://vk.com/prog_life 🚀 Группа FaceBook - https://www.facebook.com/unsupportedbrowser Инстаграм itProger: https://www.facebook.com/unsupportedbrowser Instagram: https://www.facebook.com/unsupportedbrowser Telegram: https://t.me/itProger_official Twitter - https://twitter.com/GoshaDudar - Уроки от #GoshaDudar 👨🏼‍💻 - Все уроки по хештегу #goshaSQL

Preparing download options

popular icon
Popular
hd icon
HD video
audio icon
Only sound
total icon
All
* — If the video is playing in a new tab, go to it, then right-click on the video and select "Save video as..."
** — Link intended for online playback in specialized players

Questions about downloading video

mobile menu iconHow can I download "Уроки SQL для начинающих / #7 - Объединение данных" video?mobile menu icon

  • http://unidownloader.com/ website is the best way to download a video or a separate audio track if you want to do without installing programs and extensions.

  • The UDL Helper extension is a convenient button that is seamlessly integrated into YouTube, Instagram and OK.ru sites for fast content download.

  • UDL Client program (for Windows) is the most powerful solution that supports more than 900 websites, social networks and video hosting sites, as well as any video quality that is available in the source.

  • UDL Lite is a really convenient way to access a website from your mobile device. With its help, you can easily download videos directly to your smartphone.

mobile menu iconWhich format of "Уроки SQL для начинающих / #7 - Объединение данных" video should I choose?mobile menu icon

  • The best quality formats are FullHD (1080p), 2K (1440p), 4K (2160p) and 8K (4320p). The higher the resolution of your screen, the higher the video quality should be. However, there are other factors to consider: download speed, amount of free space, and device performance during playback.

mobile menu iconWhy does my computer freeze when loading a "Уроки SQL для начинающих / #7 - Объединение данных" video?mobile menu icon

  • The browser/computer should not freeze completely! If this happens, please report it with a link to the video. Sometimes videos cannot be downloaded directly in a suitable format, so we have added the ability to convert the file to the desired format. In some cases, this process may actively use computer resources.

mobile menu iconHow can I download "Уроки SQL для начинающих / #7 - Объединение данных" video to my phone?mobile menu icon

  • You can download a video to your smartphone using the website or the PWA application UDL Lite. It is also possible to send a download link via QR code using the UDL Helper extension.

mobile menu iconHow can I download an audio track (music) to MP3 "Уроки SQL для начинающих / #7 - Объединение данных"?mobile menu icon

  • The most convenient way is to use the UDL Client program, which supports converting video to MP3 format. In some cases, MP3 can also be downloaded through the UDL Helper extension.

mobile menu iconHow can I save a frame from a video "Уроки SQL для начинающих / #7 - Объединение данных"?mobile menu icon

  • This feature is available in the UDL Helper extension. Make sure that "Show the video snapshot button" is checked in the settings. A camera icon should appear in the lower right corner of the player to the left of the "Settings" icon. When you click on it, the current frame from the video will be saved to your computer in JPEG format.

mobile menu iconWhat's the price of all this stuff?mobile menu icon

  • It costs nothing. Our services are absolutely free for all users. There are no PRO subscriptions, no restrictions on the number or maximum length of downloaded videos.