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, cityname
Kid SIN name, age, plsin psin playground name
Playground name streetno cityname, zipcode
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. plsin and psin 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 names of citys with no playgrounds.
Find the names and populations of the least crowded citysie least population
Find SINs and names of employees who have some kids going to playgrounds to play.
Find playgrounds which isare attended only by kids from the same city where the playground isare 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
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
