| COMP3311 Final Exam 21T3 |
The University of New South Wales COMP3311 Database Systems Final Exam 21T3 |
Database Systems |
Write an SQL view that gives information about the most recently sold properties.
Define the view as q1(date,price,type), where the attributes are:
Note that while date and type are SQL keywords, it is safe to use them without double-quotes.
The output should be ordered by price. What the output should look like:
property=# select * from q1;
date | price | type
------------+---------+-----------
2021-11-09 | 1816000 | Townhouse
2021-11-09 | 1859000 | Townhouse
2021-11-09 | 2154000 | House
2021-11-09 | 2230000 | House
2021-11-09 | 2665000 | House
2021-11-09 | 2833000 | House
2021-11-09 | 2836000 | House
(7 rows)
Instructions: