1 00:00:00,180 --> 00:00:01,430 All righty, then. 2 00:00:01,440 --> 00:00:02,760 It's a little enthusiastic. 3 00:00:03,270 --> 00:00:07,630 Well, next up, we're going to talk about some, which is another built in function. 4 00:00:07,650 --> 00:00:12,120 It does that it sounds like I know I say that a lot, but it sums together data. 5 00:00:12,810 --> 00:00:13,980 It adds things together. 6 00:00:14,400 --> 00:00:15,450 Very exciting. 7 00:00:15,630 --> 00:00:17,040 It actually is pretty useful. 8 00:00:17,370 --> 00:00:21,300 You can do things like, I don't know, some together, all the profits, all the sales that you've 9 00:00:21,300 --> 00:00:25,620 made or your entire payroll for a given month, let's say. 10 00:00:26,100 --> 00:00:28,850 You can find some important information using some. 11 00:00:28,860 --> 00:00:32,670 For instance, you might want to sum all the pages in our entire database. 12 00:00:32,910 --> 00:00:37,280 So this is following the same pattern as the last couple of videos have. 13 00:00:37,290 --> 00:00:41,310 We're going to show you how to use this function on its own without group buy. 14 00:00:41,340 --> 00:00:44,970 And then I'll show you at the end of the video how to use it with group buy. 15 00:00:45,510 --> 00:00:50,240 So some all the pages in the entire database, it's pretty simple. 16 00:00:50,250 --> 00:00:54,150 It's just a select some pages. 17 00:00:56,650 --> 00:00:58,420 From books. 18 00:00:59,310 --> 00:01:03,680 And it tells us 6623 and that's all there is. 19 00:01:03,690 --> 00:01:08,880 We could do silly things like some go away, Siri. 20 00:01:09,690 --> 00:01:10,680 All right, we're back. 21 00:01:10,770 --> 00:01:17,130 So we could do something silly, like a select sum released here. 22 00:01:18,060 --> 00:01:21,840 And that's just going to add together all the years in our database. 23 00:01:25,510 --> 00:01:25,950 Let's see. 24 00:01:25,960 --> 00:01:28,930 37,996. 25 00:01:29,110 --> 00:01:31,570 Very important insight we just gained. 26 00:01:32,500 --> 00:01:35,620 So that's all there is to summing things on its own. 27 00:01:36,100 --> 00:01:39,690 Now let's see how we use it in conjunction with Group B. 28 00:01:40,630 --> 00:01:42,970 It works the same way as what we've seen before. 29 00:01:43,000 --> 00:01:49,960 Basically, we group things together by whatever, let's say author or I don't know, year, and then 30 00:01:49,960 --> 00:01:53,890 we select what we want and we can use some to help us select. 31 00:01:54,190 --> 00:01:58,270 So select all the pages or some all the pages each author has written. 32 00:01:58,270 --> 00:01:59,180 Let's see who. 33 00:01:59,200 --> 00:02:04,480 Which author cumulative cumulatively has written the most number of pages. 34 00:02:05,560 --> 00:02:14,200 So we'll start with a select and let's do the same thing worth with author f name, author l name, 35 00:02:14,200 --> 00:02:17,620 and then we'll some pages. 36 00:02:17,950 --> 00:02:21,400 So we'll do that from books. 37 00:02:22,120 --> 00:02:27,520 And then we need our all important group by author f name author. 38 00:02:27,670 --> 00:02:31,210 Actually, we need to do l name first and then f name. 39 00:02:32,200 --> 00:02:33,130 Just like that. 40 00:02:34,660 --> 00:02:35,560 And you can see. 41 00:02:36,360 --> 00:02:41,130 Looks like Dave Eggers has the most 1293. 42 00:02:41,640 --> 00:02:43,710 Raymond Carver 702. 43 00:02:43,770 --> 00:02:49,950 John Steinbeck only has one book, so it's only 181 pages, and that's pretty much it to some at this 44 00:02:49,950 --> 00:02:50,520 point. 45 00:02:50,880 --> 00:02:57,000 We could, of course, do the same thing with, let's say, adding the release year for their books. 46 00:02:58,100 --> 00:03:01,250 Also a very insightful piece of information that we need. 47 00:03:01,250 --> 00:03:07,640 But we can see people who have multiple books like Raymond Carver. 48 00:03:07,670 --> 00:03:09,740 There's multiple years added together. 49 00:03:10,850 --> 00:03:12,620 Yep, that's pretty much it. 50 00:03:13,040 --> 00:03:18,290 So that's some like I said, you may end up using it if you're, I don't know, dealing with sales data 51 00:03:18,290 --> 00:03:23,060 or payroll, any sort of information where you're summarizing things. 52 00:03:23,780 --> 00:03:30,080 Actually, I just used it recently when I was compiling my taxes. 53 00:03:31,220 --> 00:03:38,960 Probably going to bore you to death with this, but I have a whole I have a database that has sales 54 00:03:38,960 --> 00:03:43,730 data for every week for one of the one of my projects that I have going on. 55 00:03:43,730 --> 00:03:50,510 And I just wanted to figure out exactly in a given year how many sales are not how many, but how many 56 00:03:50,510 --> 00:03:55,380 dollars I had sold in that entire year and just add all those values together. 57 00:03:55,400 --> 00:04:01,670 I didn't want to manually enter them into a calculator, so it was just a matter of using select some. 58 00:04:01,880 --> 00:04:06,920 And I actually did a select some with a group buy because I grouped by year because I have sales going 59 00:04:06,920 --> 00:04:10,400 back I think 2016, 15 and 14. 60 00:04:10,400 --> 00:04:13,340 So I only wanted 2016 for my tax season. 61 00:04:13,700 --> 00:04:15,390 Anyways, if you're still there. 62 00:04:15,410 --> 00:04:16,760 Thanks for making it through that. 63 00:04:17,000 --> 00:04:23,870 I know taxes are not the most interesting subject, but yeah, some can be useful sometimes. 64 00:04:24,260 --> 00:04:24,550 Oh boy. 65 00:04:24,590 --> 00:04:25,580 I'm going to end it now. 66 00:04:25,610 --> 00:04:26,630 That was just bad.