Estate Agency Q2

An estate agency makes details of the properties that is has for sale available to potential customers through a website. The details of the properties and other data that are useful to the agency are stored in a relational database.

The individual web pages about specific properties that a customer can view are generated dynamically by a program from the data in the database.

A client-server system which uses CRUD and REST is used to provide tails of properties in a web page that is being viewed in a web browser on a client computer.

Figure 3 shows the structure of the relations in the database.

Figure 3

Property(PropertyID, HouseNum, Street, Area, Postcode, Bedrooms, Bathrooms, AskingPrice, SellerID)

Seller(SellerID, Title, Forename, Surname, Telephone)

Buyer(BuyerID, Title, Forename, Surname, Telephone, DesiredArea, MinBedrooms, MaxPrice)

Viewing(BuyerID, PropertyID, ViewingDate, ViewingTime)

Sale(SaleID, PropertyID, BuyerID, SalePrice)

Question

Write an SQL query to find the Forename, Surname and telephone numbers of all buyers who have viewed properties with at 3 or more bedrooms and an asking price of strictly less than 400,000.