47 | | select a.apartment_size,a.apartment_adress,au.phone_number,p.cityname,p.number_of_roommates,p.price |
48 | | from apartment a,post p,appuser au,owner_post op,apartment_owner ao,building b |
49 | | where p.postid=op.owner_postid |
50 | | and |
51 | | ao.ownerid=a.ownerid |
52 | | and |
53 | | op.ownerid=a.ownerid |
54 | | and |
55 | | op.apartmentid=a.apartmentid |
56 | | and |
57 | | au.userid=op.ownerid |
58 | | and |
59 | | a.buildingid=b.buildingid |
| 47 | insert into city(cityname) |
| 48 | values ('Skopje'); |
| 49 | |
| 50 | insert into building(cityname,building_adress) |
| 51 | values ('Skopje','Prashka 21'); |
| 52 | |
| 53 | insert into apartment(buildingid,ownerid,apartment_adress,apartment_size) |
| 54 | values (1,1,'2nd Floor Room 21','55m2'); |
| 55 | |
| 56 | insert into post(cityname,number_of_roommates,price,date_posted,description) |
| 57 | values ('Skopje',4,200,TO_DATE('10/09/2022', 'DD/MM/YYYY'),'izdavam stan'); |
| 58 | |
| 59 | insert into owner_post(owner_postid,apartmentid,ownerid) |
| 60 | values (1,1,1); |