Database schema:
CREATE TABLE Ref_Age_Categories (
  age_category_code TEXT PRIMARY KEY,
  age_category_description TEXT
);
CREATE TABLE Ref_Property_Types (
  property_type_code TEXT PRIMARY KEY,
  property_type_description TEXT
);
CREATE TABLE Ref_Room_Types (
  room_type_code TEXT PRIMARY KEY,
  room_type_description TEXT
);
CREATE TABLE Ref_User_Categories (
  user_category_code TEXT PRIMARY KEY,
  user_category_description TEXT
);
CREATE TABLE Addresses (
  address_id NUMBER PRIMARY KEY,
  line_1_number_building TEXT,
  line_2_number_street TEXT,
  line_3_area_locality TEXT,
  town_city TEXT,
  zip_postcode TEXT,
  county_state_province TEXT,
  country TEXT,
  other_address_details TEXT
);
CREATE TABLE Features (
  feature_id NUMBER PRIMARY KEY,
  feature_name TEXT,
  feature_description TEXT
);
CREATE TABLE Users (
  user_id NUMBER PRIMARY KEY,
  age_category_code TEXT,
  user_category_code TEXT,
  user_address_id NUMBER,
  is_buyer TEXT,
  is_seller TEXT,
  login_name TEXT,
  password TEXT,
  date_registered TIME,
  first_name TEXT,
  middle_name TEXT,
  last_name TEXT,
  other_user_details TEXT
);
CREATE TABLE Properties (
  property_id NUMBER PRIMARY KEY,
  property_address_id NUMBER,
  owner_user_id NUMBER,
  property_type_code TEXT,
  date_on_market TIME,
  date_off_market TIME,
  property_name TEXT,
  property_description TEXT,
  garage_yn TEXT,
  parking_lots TEXT,
  room_count TEXT,
  vendor_requested_price NUMBER,
  price_min NUMBER,
  price_max NUMBER,
  other_property_details TEXT,
  FOREIGN KEY (property_type_code) REFERENCES Ref_Property_Types(property_type_code),
  FOREIGN KEY (property_address_id) REFERENCES Addresses(address_id),
  FOREIGN KEY (owner_user_id) REFERENCES Users(user_id)
);
CREATE TABLE Property_Features (
  property_id NUMBER,
  feature_id NUMBER,
  feature_value TEXT,
  property_feature_description TEXT,
  FOREIGN KEY (property_id) REFERENCES Properties(property_id),
  FOREIGN KEY (feature_id) REFERENCES Features(feature_id)
);
CREATE TABLE Property_Photos (
  property_id NUMBER,
  photo_seq NUMBER,
  photo_title TEXT,
  photo_description TEXT,
  photo_filename TEXT,
  FOREIGN KEY (property_id) REFERENCES Properties(property_id)
);
CREATE TABLE Rooms (
  property_id NUMBER,
  room_number TEXT,
  room_type_code TEXT,
  room_size TEXT,
  other_room_details TEXT,
  FOREIGN KEY (room_type_code) REFERENCES Ref_Room_Types(room_type_code),
  FOREIGN KEY (property_id) REFERENCES Properties(property_id)
);
CREATE TABLE User_Property_History (
  user_id NUMBER,
  property_id NUMBER,
  datestamp TIME,
  FOREIGN KEY (property_id) REFERENCES Properties(property_id),
  FOREIGN KEY (user_id) REFERENCES Users(user_id)
);
CREATE TABLE User_Searches (
  user_id NUMBER,
  search_seq NUMBER,
  search_datetime TIME,
  search_string TEXT,
  FOREIGN KEY (user_id) REFERENCES Users(user_id)
);

Question: Return the date stamp and property name for each property history event, sorted by date stamp.
SQL: SELECT T1.datestamp ,  T2.property_name FROM User_Property_History AS T1 JOIN Properties AS T2 ON T1.property_id  =  T2.property_id ORDER BY datestamp;

Question: What is the minimum number of rooms in a property?
SQL: SELECT min(room_count) FROM Properties;

Question: Give the category description of the age category 'Over 60'.
SQL: SELECT age_category_description FROM Ref_Age_Categories WHERE age_category_code  =  'Over 60';

Question: What is the id of the property that had the lowest requested price from the vendor, and what was that price?
SQL: SELECT property_id ,  vendor_requested_price FROM Properties ORDER BY vendor_requested_price LIMIT 1;

Question: List the average room count of the properties with gardens.
SQL: SELECT avg(T3.room_count) FROM Property_Features AS T1 JOIN Features AS T2 ON T1.feature_id  =  T2.feature_id JOIN Properties AS T3 ON T1.property_id  =  T3.property_id WHERE T2.feature_name  =  'garden';

Question: On average, how many rooms does a property have?
SQL: SELECT avg(room_count) FROM Properties;

Question: How many properties have 1 parking lot or 1 garage?
SQL: SELECT count(*) FROM Properties WHERE parking_lots  =  1 OR garage_yn  =  1;

Question: Which property had the lowest price requested by the vendor? List the id and the price.
SQL: SELECT property_id ,  vendor_requested_price FROM Properties ORDER BY vendor_requested_price LIMIT 1;

Question: What is the detailed description of the age category code 'Over 60'?
SQL: SELECT age_category_description FROM Ref_Age_Categories WHERE age_category_code  =  'Over 60';

Question: Which countries and cities are included in addresses?
SQL: SELECT country ,  town_city FROM Addresses;

Question: What are the feature name and description of the most commonly seen feature across properties?
SQL: SELECT T1.feature_name ,  T1.feature_description FROM Features AS T1 JOIN Property_Features AS T2 ON T1.feature_id  =  T2.feature_id GROUP BY T1.feature_name ORDER BY count(*) DESC LIMIT 1;