BABSAAY, ALBREN VINCENT F.
BSIT – 2C
INFORMATION MANAGEMENT
1.Display the property number, street and country information ordered by country.
MY SQL
SELECT propertyno, street, country FROM property ORDER BY country ASC;
1. Display the property number, street and country information ordered by country (descending)
and property number (ascending)
MY SQL
SELECT propertyno, street, country FROM property ORDER BY country desc, proper
tyno asc;
2. Display the property information for properties that have less than 4 rooms.
MY SQL
SELECT * FROM property WHERE rooms<4;
3. Display all the properties with 4 rooms and rent of over 5400
MY SQL SELECT * FROM property WHERE rooms=4 AND rent>5400;
4. Display a list of client last names, preference type and the maximum rent figure with
preference of Villas ordered by their maximum rent figure ascending.
MY SQL
SELECT Lname, preftype, maxrent FROM client WHERE preftype="Villas" ORDER B
Y maxrent asc;
5. Show a list of clients who have made a comment ordered by property number descending.
MY SQL
SELECT * FROM booking WHERE comment is NOT NULL ORDER BY propertyno desc;
6. Display the property numbers, type, rent and owner number of those properties who have a
yearly income figure more than Php 110,000 and have 4 rooms, ordered by property number
and type ascending.
MY SQL
SELECT propertyno, type, rent FROM property WHERE yearincome>110000 and rooms=
4 ORDER BY propertyno asc, type asc;