mysql - What can I use if I want't to display a top 10 list of records -
I have a room booking system, where users can select a room, and then for that room Times can book
I do not want to extend my system a little bit, with the option of the top 10 list of the most booked rooms.
You can view your database, and this is a foreign key here:
I know that I have all my bookings on which 2FX room_id is:
SELECT COUNT (*) from 'booking 'Where `cell_id` = 2 but what I want to achieve, something like this will appear in the list:
cell 1 = 84 Booking Room 2 = 70 Reservation Room 3 = 54 Booking etc. Can someone point me in the right direction?
select COUNT (*) as bCount, by Room_ID `Bookings` group Book LIMIT 10 by the room_id order
Comments
Post a Comment