Question: Objective: To practice more with SQL : Part I - Use SQL to solve the following question from the textbook ! 6 . 1 6
Objective: To practice more with SQL :
Part I Use SQL to solve the following question from the textbook
Part II Considering the following four tables:
FarmerTCid name, age, sex, vname
Villagename area, population, province
KidsSIN fTcid, TCid, sname
Schoolsname vname, no classes
Where: sname corresponds to school name, vname corresponds to village name, and Cid and mTCid stand for the father's and mother's TCid, respectively.
Code the following queries in SQL :
a Find TCid of farmers who have some kids going to school?
b Find each school attended only by kids from the same village where the school is located?
c Find the names of female farmers who live in "Esenler"?
d Assume a kid can go to more than one school, find kids going to schools where "Ali" lives but do not go to any of the schools where "Omer" lives?
e Find names of villages with no schools?
Extra questions:
Code the following queries in :
a Find TCid of farmers who have some kids going to every school?
b Find TCid of farmers who have some kids going to every school in their village?
c Find schools which have all attending kids coming from the same one single village?
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
