BMGT 402 Lecture Notes - Lecture 16: Aggregate Function, The London Group, Dno

23 views10 pages

Document Summary

Bmgt402 lecture 16 chapter 6: data manipulation cont. Order by s. branchno, s. staffno: for each hotel (hotel name) list the total number of rooms of each room type and the average price. Room (roomno, hotelno, type, price: weak entity type. , datefrom, dateto, guestno: verb as a name of a table because its derived from a binary relationship. Group by h. hotelname, r. type: for each hotel in london, list the total number of rooms and average price for each room type. Where h. hotelno = r. hotelno and h. city = london". For each hotel list the total number of bookings for each room type. Group by h. hotelname, r. type: for each city list the total number of hotels and the total number of rooms. Order by h. city: for each city list the total number of hotels and the total number of rooms of each type. Select h. city, r. type, count (distinct h. hotelno) as hcnt, count (r. roomno) as rcnt.

Get access

Grade+20% off
$8 USD/m$10 USD/m
Billed $96 USD annually
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
40 Verified Answers
Class+
$8 USD/m
Billed $96 USD annually
Class+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
30 Verified Answers

Related Documents