Workspace
Will A. Tran/

NEWS Real Estate Market Analysis

0
Beta
Spinner

NEWS Real Estate Market Analysis

This is SQL analysis for graph that posted on Tableau Tableau Link: https://public.tableau.com/views/NEWSProject-CaliforniaRealEstatePrice/Dashboard1?:language=en-US&:display_count=n&:origin=viz_share_link

Original Dataset: https://www.kaggle.com/datasets/yellowj4acket/real-estate-california

Unknown integration
DataFrameavailable as
cali_houses_2020
variable
SELECT * FROM 'cali_houses_2020.csv'
This query is taking long to finish...Consider adding a LIMIT clause or switching to Query mode to preview the result.

Analyzing

Unknown integration
DataFrameavailable as
price_change_20
variable
--property price change in 2020
SELECT
    EXTRACT(MONTH FROM datePostedString) AS Month,
    EXTRACT(YEAR FROM datePostedString) AS Year,
    percentile_disc(0.5) WITHIN GROUP (ORDER BY price) AS MedianPrice
FROM 'cali_houses_2020.csv'
GROUP BY EXTRACT(MONTH FROM datePostedString), EXTRACT(YEAR FROM datePostedString)
ORDER BY EXTRACT(YEAR FROM datePostedString), EXTRACT(MONTH FROM datePostedString)
This query is taking long to finish...Consider adding a LIMIT clause or switching to Query mode to preview the result.
Unknown integration
DataFrameavailable as
price_features_20
variable
--correlation between property features (size, number of bedrooms,etc...) and their prices
SELECT
price,
livingArea,
bedrooms,
bathrooms
FROM 'cali_houses_2020.csv'
WHERE 
price IS NOT NULL
AND livingArea IS NOT NULL
AND bedrooms IS NOT NULL
AND bathrooms IS NOT NULL
This query is taking long to finish...Consider adding a LIMIT clause or switching to Query mode to preview the result.
Unknown integration
DataFrameavailable as
high_med_20
variable
--query top 3 highest median price per county
SELECT
county,
percentile_disc(0.5) WITHIN GROUP (ORDER BY price) AS high_med_price
FROM 'cali_houses_2020.csv'
GROUP BY county
ORDER BY high_med_price DESC
LIMIT 3
This query is taking long to finish...Consider adding a LIMIT clause or switching to Query mode to preview the result.
Unknown integration
DataFrameavailable as
low_med_20
variable
--query top 3 lowest median price per county
SELECT
county,
percentile_disc(0.5) WITHIN GROUP (ORDER BY price) AS low_med_price
FROM 'cali_houses_2020.csv'
GROUP BY county
ORDER BY low_med_price
LIMIT 3
This query is taking long to finish...Consider adding a LIMIT clause or switching to Query mode to preview the result.
Unknown integration
DataFrameavailable as
price_county_20
variable
--query for relationship between property location (county or city) and its price
SELECT 
	county,
	'California' AS State,
    percentile_disc(0.5) WITHIN GROUP (ORDER BY price) AS MedianPrice
FROM 'cali_houses_2020.csv' 
WHERE price IS NOT NULL AND livingArea IS NOT NULL
GROUP BY county
This query is taking long to finish...Consider adding a LIMIT clause or switching to Query mode to preview the result.
  • AI Chat
  • Code