Subtitles for Count, Group By with MySql Workbench. Video Tutorial SQL 11 in English.

10,644   22   1  
Tags: count
  Pause sub
hello hi Melly photo for have up
and aces tutorial
memory 11 of SQL in this
tutorial we're going to take a
look at the
function group by and count
took out betty's the first thing
we could do
is to see what we've got wifi
we're going to use the
offer stable which has three the
authors
and we conclude here we optimise
the office had it would be
unfair to we can also look at
the book stay low we've got five
books
sorry to my Yahoo one
beaten by a leap wanted to Mike
one
I want me to my bed lastly we've
got the publisher table
which could be published Sep
we've got edible have up
at made though probably okay
let's see what we could do with
these
something easy it would be to
cut the
of this a the Whaley embed
how can we do these well
instead of just asked to resched
we can use counts
and then ask that these easy
enough
way to run and here we are
she trio office as we've gone to
the authors we could just as
well
comment box so write books okay
five books as we can see
in a table books who with gots
five books
here we are okay let's do
something
a bit more complicated we going
to try to get
the number of publication up
each
of the publication
basically how many books have a
what we want to know
is how many Ave from each of it
they do has weakened to
ellie has to return one 11 also
and Bill one well that's good
over the books table well we're
going to do
whether it we're going to need
is still columns
one with the offer on the other
one with how many books
there of victim I those of
that's the first thing women to
write East author
with base we can already see the
name of the author
hit you up hey at least twice
the correct thing would be that
said who was Tony return
once really I'm for these we're
going to
use group
by with this we can put the
repeated just sit registers into
groups we have to specify
in what I we going to prudes
into a coupe
he will be of her in this case
we want to a register for each
author executes we have an era
because had left
all the selected okay here we
are com
bid they all that's it now I
would like it to
count come if for you remember I
had
a good price so now I would like
a second column saying how many
second column saying how many
times this
ITO film offers superior it's
very simple get just have to put
to count him
way around it
and you can see him we have come
this time
that and group by put me
together two registers
and who then has to
barely has just one here one and
here oasap
in the first case it go to
because heather was stricken
twice if we now
edit books and for example
antique table that up
we could change fed up far
any for example we're on the
application
and see it's correct to return
by air though here and to reach
him by a leap
the first problem we're going to
resolve is
we would like to know the number
of publications
of one publisher
as and im we saw here
we have to publish first here we
are number one
is hella fun have up a number
two they say the public
we want to know how many of it
week so take a look at the book
stable
head 04 have a house to one
and to these to
of film 80 probably
yes n edu follow number four has
no probably ship
one is tied to be independent
working without a tutorial
add an editorial what we want
now is the number of publication
of its probably ship
we want to column published a
and midsize
this column the publications
that probably took column
would be the name of the
property shop
I wouldn't want to do is to
select
so I'm and in this case it would
be
the table publisher
here we on in fact what we only
once
of the Polish a is the name so
is right name very tease
it if I have a Nanuk will lean
I'm we also need another card
now
with the publications here this
information is in the
am in the table books
I'm going to do it with the
WHERE clause seen this case
we'll move on also called the
Polish a table
p on the books table be
and and the condition the WHERE
condition would be that
in feet got ID pull the show
equals be
dot
Heidi publisher and here
I'll ask photo their registers
from them book table
okay here we are
we can see the name of the
probably should table I'm be
skies we've got told that
registers up the books
we and really I'm not interested
in the details of the folks
instead of this I'm going to
make account because
this information ease K not
necessary
however right count
I want him to come
them my this didn't work very
well
it says follow how 12
goop by the name okay
gook by name
there we go how I'm going to
coop
all the ones we saw it before by
name
and itself
each name I have to as we can
see here
and if I have a2 okay if we at
the table
in books we see the we had
falk 24 May 24 have up and to
film it though probably
let's imagine now that the dream
of
one being independent was
one of being independent was
impossible and he now works
with a petition hey look what
happened in this case
we say
and them not guys SQL when we
execute the query again
we see that edit probably has
three
hum
it's a big complicated them I'm
planning to do some
Mar exercised in south east in
the future term
please describing keeping totes
to be able to manage SQL you
really need to factories
so on outside to get you some
exercise so you couldn
fact is happy with based so that
you can
really managed SQL well
business of all this tutorial
see in the next one
by

Share this subtitle


Description