Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Question A: Write an SQL query that return a list of pairs of people sharing an office. Nu duplicates. Output should look like: Question B:

image text in transcribed

Question A:

Write an SQL query that return a list of pairs of people sharing an office. Nu duplicates. Output should look like:

image text in transcribed

Question B:

Write an SQL query that returns meetings where the number of atendees who have not declined (status), exceeds the capacity of the meeting room.

Many thanks in advance!

ROOMS: capacit ro0 Room1 Room2 Room3 Room4 4 PEOPLE useri rou Adam Smith Benny Hi Lharlie Chablin Donna James Edith Room2 Room Room2 Room3 Room Room1 RoomL ta ta ta Gary Potter arrypotter PARTIOPANTS eeti 289 289 929 929 status Room1 Room3 MEETINGS date 2017-03-23 2017-04-15 what eeti 289 929 slot 15 38 owne nce meetin r meetin room3 Rooms: room: the name of a room, capacity: the number of people that it will hold People: userid: unique user name, name: ordinary name, group: vip, tap, phd, office: a room or NULL Participants: meetid: the id of the meeting, pid: a userid or a room, status: u(nknown), a(ccept), d(ecline) Meetings: meetid: a unique id, date: the date of the meeting, slot: 8,9,.,18, owner: the userid of the owner of the meeting, what: a textual description of the meeting

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Beginning Databases With PostgreSQL From Novice To Professional

Authors: Richard Stones, Neil Matthew

2nd Edition

1590594789, 978-1590594780

More Books

Students also viewed these Databases questions

Question

A11.3 Explain how deferred income is recorded. (Section 11.5)

Answered: 1 week ago

Question

Discuss attempts at legislating ethics.

Answered: 1 week ago

Question

If the gross requirements indicated 40 P's are needed

Answered: 1 week ago