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 !
6.16c,e,g,i
6.19a,b,e
6.23a,b,c
Part II-- Considering the following four tables:
Farmer(TCid, name, age, sex, vname)
Village(name, area, population, province)
Kids(SIN, f_Tcid, m?_TCid, s_name)
School(sname, vname, no classes)
Where: sname corresponds to school name, vname corresponds to village name, and fTCid and m_TCid 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 name(s) 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 name(s) of village(s) with no schools?
Extra questions:
Code the following queries in SQL :
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?
Objective: To practice more with SQL : Part I -

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!