1 00:00:00,150 --> 00:00:01,900 And it's time for you to get some practice. 2 00:00:01,920 --> 00:00:04,320 We've got yet another exercise by now. 3 00:00:04,320 --> 00:00:05,550 You probably know how these work. 4 00:00:05,580 --> 00:00:11,580 In this video, I'll introduce the different prompts, the questions, challenges, whatever parts of 5 00:00:11,580 --> 00:00:13,260 the exercise, whatever you want to call them. 6 00:00:13,260 --> 00:00:17,880 And then in the next video, I'll walk through how I would come up with the solutions. 7 00:00:17,880 --> 00:00:24,450 So the first piece here, this is all using our books data set, very simple data set, write a query 8 00:00:24,450 --> 00:00:26,790 that results in this output. 9 00:00:26,820 --> 00:00:31,380 So this is all of the book titles that contain stories. 10 00:00:31,710 --> 00:00:36,450 So you know what we talk about when we talk about love stories, where I'm calling from Selected stories, 11 00:00:36,480 --> 00:00:37,920 Oblivion stories. 12 00:00:38,220 --> 00:00:44,370 So you'll need to use one of the things, one of the operators we very recently covered then find the 13 00:00:44,370 --> 00:00:45,540 longest book. 14 00:00:45,540 --> 00:00:50,790 Now in the next section, we're actually going to learn an easier way to find the maximum and minimum 15 00:00:50,790 --> 00:00:52,320 and average and some. 16 00:00:52,320 --> 00:00:59,490 But for now, when it comes to finding the longest or the maximum number of pages, you'll have to combine 17 00:00:59,490 --> 00:01:02,070 two of the concepts we saw in this section. 18 00:01:02,100 --> 00:01:08,760 You'll need to find a way to sort and a way to limit the number of results that we get. 19 00:01:08,760 --> 00:01:12,570 So that's a hint, I guess, or really that's a spoiler. 20 00:01:12,960 --> 00:01:15,330 And then part three, print a summary. 21 00:01:15,330 --> 00:01:16,710 So call it summary. 22 00:01:16,710 --> 00:01:17,400 That's important. 23 00:01:17,400 --> 00:01:23,190 Just part of the exercise using alias print a summary containing the title and year for the three most 24 00:01:23,190 --> 00:01:24,420 recent books. 25 00:01:24,720 --> 00:01:26,580 So our summary looks like this. 26 00:01:26,580 --> 00:01:30,030 The title a Space Dash Space and then the year. 27 00:01:30,030 --> 00:01:34,200 So you'll need to use some way of combining those pieces of information together. 28 00:01:34,200 --> 00:01:39,960 We've seen that a couple of sections ago, but I only want the three most recent summaries based off 29 00:01:39,960 --> 00:01:40,890 of the year. 30 00:01:41,580 --> 00:01:46,860 Then find all the books with an author last name that contains a space character. 31 00:01:46,860 --> 00:01:49,980 And I think it's just Foster Wallace for that last name. 32 00:01:49,980 --> 00:01:56,670 Don't cheat and select based off of Foster Wallace, Do it based off of containing a space and then 33 00:01:56,670 --> 00:01:58,770 print out the title and author last name. 34 00:01:59,010 --> 00:02:03,600 Then find the three books that have the lowest stock quantity. 35 00:02:03,600 --> 00:02:09,419 So 12, 12 and 23 And I want you to select the title Year end stock quantity. 36 00:02:11,070 --> 00:02:13,610 Next up, print the title and author. 37 00:02:13,620 --> 00:02:19,590 Last name sorted first by the author, last name, and then also sorted by the title. 38 00:02:19,830 --> 00:02:23,700 Remember how we can sort by multiple columns one after another. 39 00:02:23,970 --> 00:02:25,200 So there's that. 40 00:02:25,320 --> 00:02:30,490 And then this one I would like you to make this table or make this output happen. 41 00:02:30,510 --> 00:02:32,930 Call it yell as an alias. 42 00:02:32,940 --> 00:02:36,090 And what we have here is the text in all caps. 43 00:02:36,090 --> 00:02:41,790 My favorite author is, and then an author and then an exclamation point for every single author. 44 00:02:41,880 --> 00:02:45,690 And then we're sorting alphabetically by last name. 45 00:02:45,720 --> 00:02:47,250 And I believe that is it. 46 00:02:47,260 --> 00:02:51,270 Before we move on to some really fun stuff, next section, aggregate functions. 47 00:02:51,270 --> 00:02:52,260 But we're not there yet. 48 00:02:52,290 --> 00:02:53,010 Go ahead. 49 00:02:53,010 --> 00:02:54,720 Please try this exercise. 50 00:02:54,720 --> 00:02:57,740 Pause on each one of these or just open the slides yourself. 51 00:02:57,750 --> 00:02:58,710 Try them out. 52 00:02:58,710 --> 00:03:03,420 And if you want to watch me do it or if you need a solution, watch the next video. 53 00:03:03,450 --> 00:03:04,780 I'll try not to put you to sleep. 54 00:03:04,800 --> 00:03:05,480 I'll see you then.