I have following database schema:
I want to create view for all property types (flat,plot,house) with address fields, property price/size and user ID.
I have an sql script like this:
create or replace VIEW auction_view3 AS
select ROW_NUMBER() OVER(ORDER BY f.userid) AS id, f.userid, r."type", a.street, a.homenumber, a.localnumber, a.city, a.postcode, f.price, f."size", f.rooms, f.floor
FROM address a, flat f, realassets r
WHERE f.addressid = a.id AND a.realassetid =r.id
This script create view only for flats, it looks good, but also I want to show houses and plots in my view, I don't know how to put in my price column in view - price values from all property tables (plot, house, flat).
How can I display data from three property tables in one view.
I can achieve it through multiple selects?
