1 00:00:00,120 --> 00:00:00,480 All right. 2 00:00:00,480 --> 00:00:06,120 So before we go any further, we have a couple of quick exercises that are just going to test you basically 3 00:00:06,120 --> 00:00:08,970 on what we just learned select and where. 4 00:00:09,360 --> 00:00:14,460 So the first one, I'd like you to write the SQL that will select the following. 5 00:00:14,460 --> 00:00:16,079 And this is using our cats. 6 00:00:16,079 --> 00:00:21,690 So the same data that we already had, which is why I asked you to hopefully you inserted the same cats, 7 00:00:21,690 --> 00:00:25,980 basically select all the cats, but only get their ID. 8 00:00:26,460 --> 00:00:30,870 And then the next thing I'd like you to do, of course, you can pause the video and do it and then 9 00:00:30,870 --> 00:00:36,390 move on when you're ready to the next question, which is right, the SQL that will select the following. 10 00:00:37,260 --> 00:00:39,450 Name and breed only. 11 00:00:39,450 --> 00:00:41,640 So we don't want ID, we don't want age. 12 00:00:41,640 --> 00:00:43,590 Just name and breed in that order. 13 00:00:44,070 --> 00:00:45,450 For all of the cats. 14 00:00:46,780 --> 00:00:47,260 All right. 15 00:00:47,260 --> 00:00:49,660 And the next one is a little bit more complicated. 16 00:00:49,660 --> 00:00:51,250 You'll need to combine both things. 17 00:00:51,250 --> 00:00:54,880 We just learned the select expression and the where clause. 18 00:00:55,540 --> 00:00:59,560 So in this case, you're going to only select the tabby cat. 19 00:00:59,560 --> 00:01:04,150 So the cats that have breed equal to tabby and we only want name and age. 20 00:01:04,870 --> 00:01:09,670 And then finally, this is a little bit of a challenge because I didn't show exactly how to do this, 21 00:01:09,670 --> 00:01:11,890 but hopefully you'll be able to figure it out. 22 00:01:12,190 --> 00:01:18,010 We'll talk about it in the answer video either way, but hopefully it's not too difficult in this case. 23 00:01:18,340 --> 00:01:23,340 What you're doing is selecting the instances where cat ID and age are the same. 24 00:01:23,350 --> 00:01:31,090 So if I go back to the data here, when I select all of them, if you look here, cat ID and age, they're 25 00:01:31,090 --> 00:01:38,740 not the same one and four, two and ten, but egg eggs, cat ideas, four and egg is four years old 26 00:01:38,740 --> 00:01:43,660 and Jackson is has an idea of seven and is seven years old. 27 00:01:43,900 --> 00:01:46,570 So how can you select just those two? 28 00:01:47,200 --> 00:01:49,060 And I don't want you to cheat. 29 00:01:49,060 --> 00:01:51,970 Don't select based off of their name or their breed or something. 30 00:01:51,970 --> 00:01:58,270 I want you to select where cat ID is the same as age and we only want cat ID and age as well. 31 00:01:59,200 --> 00:02:00,700 OC solution video is coming up next.