I'll come back again to PostgreSQL.
And let's go ahead and look at react class with other classes like the and the or and so on.
So we have done or we've looked at the class previously, but now we have a larger dataset.
I want us to apply this with this dataset.
So I can be able to work with something that looks real.
Now let's see.
We have select all from students and we're able to generate everything from here.
Now what if I want to generate maybe only the students from Nigeria.
Let's go ahead and see how we can be able to do that.
So we'll go ahead and say start from student and then we'll give a react class where uh country is equal
to Nigeria.
So and let's go ahead and is the cutest query on setup.
So now we have our students from Nigeria and we have just seven of them.
Now what if I'm asked to give only the female students from Nigeria.
How can I be able to do that?
I would not cross and I'm going to see.
And then and I'm going to say, and gender is equal to maybe female or male.
So in that case I'm going to say male if that is for male.
And I will execute this query.
And this we have just three male students from Nigeria.
And that is the same thing with all other ones like other columns, if you want to specify or what if
I say select all from uh, all students where the country is equal to Nigeria, then I'm going to add
another country.
And if I want to add another country right in here, you go ahead and uh, let me say to make that easy
for us, I'll go ahead and cut this.
I'm going to say select where gender is equal to no.
Then and I'm going to see an.
Array so and country I'm going to put this country inside here.
Let's go ahead and close this then inside here.
And I'm going to give a necklace code all.
So I'm going to say all country is equal to.
I'm going to let me choose any country and let me say China.
And let's go ahead and execute the query and check it out.
Now we have all these male students from Nigeria and China.
All right.
So let me check a country that is smaller than Ghana Ghana.
And let's go ahead and execute query and check it out.
All right.
So we have just three from Ghana and two from Ghana and three from Nigeria.
So and remember I selected a where gender is equal to male.
What if I go ahead and see where gender is equal to female.
And let's go ahead and coherent is a coherent.
Check it out.
We have no female students from Ghana.
I want to change this to maybe to another country like Poland and execute this query.
We check it out.
So we see you have much students from Poland as well.
Oh so this is also applicable to say let me say select all from students where first name is equal.
To specify the first name, let's say I'm going to say where first underscore name is equal to.
I'm going to copy any of these.
Let me see.
Noah okay.
No it is not far away.
Where is semicolon n.
And that is the query.
And we have these and it says okay we have another from China and Poland.
And what if I want to specify when the country comes from.
So I want to say state oil from students who are first name is equal to none.
And then I want to specify country equal to China.
And let's go ahead and execute this query.
And you can see we're able to filter that.
So it's applicable to email.
You can see we get email is equal to the email we're looking for.
You can also assign the first name is equal to this.
And where the country is equal to this I hope that is cool.
So in that way you can actually filter everything just the way it's supposed to be.
And you can have a clean output and present that to your supervisors or whoever needs that data from
the database.
I hope that is really very cool.
So go ahead and check it out, practice with it, and if you have any questions, go ahead and use the
question and answer section.
And I'm going to get back to you as soon as possible.
Thank you so much.
And I'm going to see you in the next video lecture.