0% found this document useful (0 votes)
8 views1 page

SQL Queries

Uploaded by

vamsiraghu0024
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
8 views1 page

SQL Queries

Uploaded by

vamsiraghu0024
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 1

1.

SELECT property_id, price, bedrooms, baths, full_address, mls_id, COUNT(*)


OVER() AS total_count
FROM property INNER JOIN property_quick_filters ON property.property_id =
property_quick_filters.property_id
WHERE property.price BETWEEN 500000 AND 1000000 AND property_quick_filters.river
= 1 LIMIT 10

2. SELECT property_id, price, bedrooms, baths, full_address, mls_id, COUNT(*)


OVER() AS total_count
FROM property INNER JOIN property_quick_filters ON property.property_id =
property_quick_filters.property_id
WHERE property_quick_filters.ocean_access = 1 LIMIT 10

3. SELECT property_id, price, bedrooms, baths, full_address, mls_id, COUNT(*)


OVER() AS total_count
FROM property INNER JOIN property_quick_filters ON property.property_id =
property_quick_filters.property_id
WHERE property_quick_filters.luxury = 1 AND property_quick_filters.golf = 1
LIMIT 10

4. SELECT property_id, price, bedrooms, baths, full_address, mls_id, COUNT(*)


OVER() AS total_count
FROM property INNER JOIN property_quick_filters ON property.property_id =
property_quick_filters.property_id
WHERE property_quick_filters.tennis = 1 LIMIT 10

5. SELECT property_id, price, bedrooms, baths, full_address, mls_id, COUNT(*)


OVER() AS total_count
FROM property INNER JOIN property_quick_filters ON property.property_id =
property_quick_filters.property_id
WHERE property_quick_filters.lake = 1 LIMIT 10

You might also like