1 00:00:01,180 --> 00:00:02,450 Welcome back. 2 00:00:02,630 --> 00:00:08,870 Now SQL can also have functions and I'm going to show you three of the most popular, most common 3 00:00:08,870 --> 00:00:14,760 ones in this video. Just to check what we have in our table, well we have users. 4 00:00:14,910 --> 00:00:27,380 And if I do SELECT star users, oop. I forgot to use FROM, we have our users. Now let's say we wanted to get 5 00:00:27,470 --> 00:00:30,010 the average score of the users. 6 00:00:30,380 --> 00:00:41,300 We can do that by saying SELECT average and give the column name inside of average let's say score FROM 7 00:00:42,340 --> 00:00:44,210 users table. 8 00:00:44,470 --> 00:00:49,220 So you can see that our function just like in Javascript has the function name 9 00:00:49,220 --> 00:00:58,130 and then the brackets around the column that we want. Lets press enter and look at that average is 10 00:00:58,130 --> 00:01:00,100 84.5. 11 00:01:00,130 --> 00:01:01,450 Very cool. 12 00:01:01,450 --> 00:01:02,900 What other functions do we have. 13 00:01:03,100 --> 00:01:12,790 Let's say we wanted to get the sum of everybody's age. 14 00:01:12,990 --> 00:01:19,520 I can invoke the SUM function and find out that we have an accumulated sum of 132. 15 00:01:19,800 --> 00:01:26,400 And then finally there's also COUNT another useful one. 16 00:01:26,630 --> 00:01:34,740 And if we want to find out how many users we have in our database we can just say COUNT name and we have 17 00:01:35,070 --> 00:01:38,200 four active users with our game. 18 00:01:38,220 --> 00:01:41,040 All right we've got to work on that to increase that number. 19 00:01:41,100 --> 00:01:41,880 Perfect. 20 00:01:41,880 --> 00:01:49,080 There's a few more functions that you can use but these are probably the most common. You can already 21 00:01:49,080 --> 00:01:49,620 imagine 22 00:01:49,650 --> 00:01:55,690 some of the power that comes with these values. I'll see in the next one, bye-bye.