Question: MAKE SURE TO CODE IN SQL Considering the following relational database with four tables: Employee ( SIN , name, age, sex, phone, city _ name

MAKE SURE TO CODE IN SQL
Considering the following relational database with four tables:
Employee (SIN, name, age, sex, phone, city_name)
Kid (SIN, name, age, pl_sin, p2_sin, playground _name)
Playground (name, street_no, city_name, zip_code)
City (name, area, population, province, country)
Where, employees may have kids. Kids may go to playgrounds to play. Each employee lives in a city. Cities may have playgrounds. pl_sin and p2_sin stand for the parenti and parentz's.
SIN of the kid, respectively. Either one of the parents of the kid or both parents can be employees and kids live with employee parents).
Code the following queries in SQL:
Find name(s) of city(s) with no playgrounds.
Find the name(s) and populations) of the least crowded city(s)(i.e. least population).
Find SIN(s) and name(s) of employees who have some kids going to playgrounds to play.
Find playgrounds) which is(are) attended only by kids from the same city where the playground is(are) located.
Find employees who have at least one kid going to every playground registered in the database. Clarification: Let's say there are 'n' playgrounds registered in the database. We are looking for employees with at least 'n' kids (the employee can have more than 'n' kids, but not less than 'n' kids) and the employee will have at least one kid at each playground.

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 Databases Questions!