WEBVTT

00:07.520 --> 00:10.100
I'll come back again to PostgreSQL.

00:10.130 --> 00:16.700
And let's go ahead and look at react class with other classes like the and the or and so on.

00:17.090 --> 00:22.310
So we have done or we've looked at the class previously, but now we have a larger dataset.

00:22.310 --> 00:26.360
I want us to apply this with this dataset.

00:26.360 --> 00:29.870
So I can be able to work with something that looks real.

00:29.900 --> 00:31.340
Now let's see.

00:31.340 --> 00:37.580
We have select all from students and we're able to generate everything from here.

00:37.610 --> 00:41.120
Now what if I want to generate maybe only the students from Nigeria.

00:41.150 --> 00:43.190
Let's go ahead and see how we can be able to do that.

00:43.190 --> 00:53.630
So we'll go ahead and say start from student and then we'll give a react class where uh country is equal

00:53.660 --> 00:54.950
to Nigeria.

00:54.950 --> 01:00.740
So and let's go ahead and is the cutest query on setup.

01:00.800 --> 01:04.820
So now we have our students from Nigeria and we have just seven of them.

01:04.850 --> 01:09.520
Now what if I'm asked to give only the female students from Nigeria.

01:09.550 --> 01:11.230
How can I be able to do that?

01:11.260 --> 01:14.050
I would not cross and I'm going to see.

01:14.080 --> 01:22.390
And then and I'm going to say, and gender is equal to maybe female or male.

01:22.420 --> 01:27.190
So in that case I'm going to say male if that is for male.

01:27.220 --> 01:29.050
And I will execute this query.

01:29.050 --> 01:33.910
And this we have just three male students from Nigeria.

01:34.570 --> 01:43.810
And that is the same thing with all other ones like other columns, if you want to specify or what if

01:43.810 --> 01:53.950
I say select all from uh, all students where the country is equal to Nigeria, then I'm going to add

01:53.980 --> 01:55.240
another country.

01:55.330 --> 02:02.980
And if I want to add another country right in here, you go ahead and uh, let me say to make that easy

02:02.980 --> 02:05.020
for us, I'll go ahead and cut this.

02:05.050 --> 02:10.540
I'm going to say select where gender is equal to no.

02:10.570 --> 02:16.400
Then and I'm going to see an.

02:18.530 --> 02:24.920
Array so and country I'm going to put this country inside here.

02:25.760 --> 02:28.700
Let's go ahead and close this then inside here.

02:28.700 --> 02:31.340
And I'm going to give a necklace code all.

02:31.340 --> 02:38.660
So I'm going to say all country is equal to.

02:41.150 --> 02:45.980
I'm going to let me choose any country and let me say China.

02:46.910 --> 02:49.700
And let's go ahead and execute the query and check it out.

02:49.730 --> 02:57.170
Now we have all these male students from Nigeria and China.

02:57.800 --> 02:58.310
All right.

02:58.310 --> 03:02.690
So let me check a country that is smaller than Ghana Ghana.

03:03.290 --> 03:05.450
And let's go ahead and execute query and check it out.

03:05.480 --> 03:05.810
All right.

03:05.810 --> 03:10.280
So we have just three from Ghana and two from Ghana and three from Nigeria.

03:10.280 --> 03:15.380
So and remember I selected a where gender is equal to male.

03:15.410 --> 03:19.160
What if I go ahead and see where gender is equal to female.

03:19.220 --> 03:21.200
And let's go ahead and coherent is a coherent.

03:21.200 --> 03:21.890
Check it out.

03:21.920 --> 03:25.220
We have no female students from Ghana.

03:25.580 --> 03:35.360
I want to change this to maybe to another country like Poland and execute this query.

03:35.360 --> 03:36.230
We check it out.

03:36.230 --> 03:39.920
So we see you have much students from Poland as well.

03:41.180 --> 03:50.360
Oh so this is also applicable to say let me say select all from students where first name is equal.

03:50.390 --> 04:01.370
To specify the first name, let's say I'm going to say where first underscore name is equal to.

04:01.670 --> 04:05.090
I'm going to copy any of these.

04:05.120 --> 04:06.260
Let me see.

04:09.530 --> 04:11.510
Noah okay.

04:11.510 --> 04:14.780
No it is not far away.

04:14.810 --> 04:16.220
Where is semicolon n.

04:16.250 --> 04:17.900
And that is the query.

04:17.900 --> 04:23.810
And we have these and it says okay we have another from China and Poland.

04:23.810 --> 04:27.650
And what if I want to specify when the country comes from.

04:27.680 --> 04:32.240
So I want to say state oil from students who are first name is equal to none.

04:32.660 --> 04:41.510
And then I want to specify country equal to China.

04:41.570 --> 04:43.550
And let's go ahead and execute this query.

04:43.550 --> 04:46.490
And you can see we're able to filter that.

04:47.150 --> 04:49.280
So it's applicable to email.

04:49.310 --> 04:52.610
You can see we get email is equal to the email we're looking for.

04:52.640 --> 04:55.220
You can also assign the first name is equal to this.

04:55.220 --> 04:59.240
And where the country is equal to this I hope that is cool.

04:59.240 --> 05:05.390
So in that way you can actually filter everything just the way it's supposed to be.

05:05.390 --> 05:12.470
And you can have a clean output and present that to your supervisors or whoever needs that data from

05:12.470 --> 05:13.610
the database.

05:14.120 --> 05:15.620
I hope that is really very cool.

05:15.620 --> 05:19.700
So go ahead and check it out, practice with it, and if you have any questions, go ahead and use the

05:19.700 --> 05:20.900
question and answer section.

05:20.900 --> 05:23.480
And I'm going to get back to you as soon as possible.

05:23.510 --> 05:24.440
Thank you so much.

05:24.440 --> 05:27.500
And I'm going to see you in the next video lecture.
