Question: Generating mysql statements. Listed below are the tables for the scheduling database. Below are the contents in each of the listed tables above. Next are

Generating mysql statements. Listed below are the tables for the scheduling database.

mysql> SHOW TABLES; I Tables in scheduling I I building I meeting I person person meeting I room 5 rows in set (O. 01 sec)

Below are the contents in each of the listed tables above.

mysql> SHOW TABLES; +-- --+ | Tables_in_scheduling | +-- -+ | building

| meeting | person I person_meeting | room +-- 5 rows inset (0.01 sec)

Next are the steps in which need to be completed based on the tables and information given above. Database: scheduling.

Task One: Find all the meetings that Tom Hanks has to attend Construct the SQL statement to find all the meetings that Tom Hanks has to attend.
Display the following columns:
- Person’s first name (person table)
- Person’s last name (person table)
- Building name (building table)
- Room number (room table)
- Meeting start date and time (meeting table)
- Meeting end date and time (meeting table)

Task Two: Find all the people that are attending meeting ID 2. Construct the SQL statement to find all the people that are attending meeting ID 2.
Display the following columns:
- Person’s first name (person table)
- Person’s last name (person table)
- Building name (building table)
- Room number (room table)
- Meeting start date and time (meeting table)
- Meeting end date and time (meeting table)

Task Three: Find all the people who have meetings in the Main Street building. Construct the SQL statement to find all the people who have meetings in the Main Street building.
Display the following columns:
Person’s first name (person table)
Person’s last name (person table)
Building name (building table)
Room number (room table)
Meeting ID (meeting table)
Meeting start date and time (meeting table)
Meeting end date and time (meeting table)

Task Four: Find the number of attendees for every meeting. Construct the SQL statement to find the number of attendees for every meeting.
Display the following columns:
Count of meeting attendees
Meeting ID (meeting table)
Meeting start date and time (meeting table)
Meeting end date and time (meeting table)

Task Five: Find All of the People that Have Meetings Only Before Dec. 25, 2016 at Noon Using INNER JOIN. Construct the SQL statement to find all of the people that have meetings only before Dec. 25, 2016 at noon using INNER JOIN.
Display the following columns:
Person’s first name (person table)
Person’s last name (person table)
Meeting ID (meeting table)
Meeting start date and time (meeting table)
Meeting end date and time (meeting table)

mysql> SHOW TABLES; +-- --+ | Tables_in_scheduling | +-- -+ | building | meeting | person I person_meeting | room +-- 5 rows in set (0.01 sec)

Step by Step Solution

3.36 Rating (159 Votes )

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!