Trees we are going to discuss the new topics which is the group by statement, we are ignoring the right join and the cell for the union. We will discuss about it in our little lectures got very awkward but for now we are just using the group by statement, the group by statement is often used with aggregate functions. When I say aggregate functions, that means I'm talking about the count max mean sum average. So, you know very well that we have already discussed these topics in my previous lectures. Okay, so how now I'm saying that I'm going to the group and saying select towns which I'm saying that Si D students, students. Now as you can see, it's giving you the seven.
Now I'm seeing row by row by city. So it's giving you the one one. If I say that select the staring students at the interpreter button. Now as you can see, we have three cities 123 so now you can see these are the same values 123456 London Karachi and address. These are the three days. So that's why I'm saying count this from students tables.
Grew by cities since we have three cities, that's why it's showing you the reserves you buy, do you know very well while using the aggregate functions to group the result set by one or more columns. So if you say that guru by me asked me it will give you why you know very well you have to stress, john shaky and you have five records. Okay. Now if I say that UPDATE students said s name equals I'm saying adios Okay, now we have to use a VM so that's why we're si V equals two. And we have successfully uploaded now check the results from students. Now you can see we have four results 1234 s five, john Ellis Maria de la Caesars Alex.
The same deserves that means we have 1234 letters. Now use the s he grew by a snake. Now you can see it's giving you the four reserves. Why? Because it has 111 Let me show you. Now as you can see, you have only single record.
That's why should you have already seen the record of Mario vs. So you want you have only a single reserves have shown you one and you have four Ls 1234. So that's why I'm showing you 4am saying count the SI D from the students now go by actually. So, you can see there So, I showing you this is the LS reserve and these are the other things we will group by statement was so group by statements are always used with aggregate concepts that is about how many facts is very useful. The statement my working on thousands of records in the next two years in other topics, thank you for watching