hosted at Guest id Guest_id occupied_room_id int FK int PK PK id first_name last_name member_since int int FKO varchar(100) varchar(100) date occupied_room PKo int timestamp timestamp int id check in check_out room_id Reservation id int FK FK Reservation room int PK id date_in date out PK varchar(20) varchar(40) varchar(10) FK id int date number name status room_type_id made_by Guest_id date varchar(20) int FK int reserved_room room_type PK id number of rooms int status room_type_id Reservation id int id int PK description max_people varchar(100) int varchar(20) FK FK int int

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question
100%

 

SQL TASK.

I need to write 2 select statement with subquery , 2 statement that joins at least two tables and contains GROUP BY and HAVING clauses , and 2 statement that joins at least two tables and contains WHERE clause.

Below , i will send a screenshot . 

hosted at
Guest
id
int PK
id
first_name
last_name
member_since date
int
PK
Guest id
int FKO
varchar(100)
varchar(100)
occupied_room id int FK
occupied_room
PKo
Og id
check in
check out
room id
Reservation id int
int
timestamp
timestamp
int
FK
FK
Reservation
room
id
int
PK
id
int
PK
date_in
date_out
made_by
Guest_id
date
varchar(20)
varchar(40)
varchar(10)
int
number
date
name
status
room_type_id
varchar(20)
int
FK
FK
reserved_room
room_type
id
int
PK
id
int
PK
number_of_rooms int
status
room_type_id
Reservation_id
description
max_people
varchar(100)
int
varchar(20)
int
FK
int
FK
Vertabelo
Transcribed Image Text:hosted at Guest id int PK id first_name last_name member_since date int PK Guest id int FKO varchar(100) varchar(100) occupied_room id int FK occupied_room PKo Og id check in check out room id Reservation id int int timestamp timestamp int FK FK Reservation room id int PK id int PK date_in date_out made_by Guest_id date varchar(20) varchar(40) varchar(10) int number date name status room_type_id varchar(20) int FK FK reserved_room room_type id int PK id int PK number_of_rooms int status room_type_id Reservation_id description max_people varchar(100) int varchar(20) int FK int FK Vertabelo
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps

Blurred answer
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY