require_once('../connection/mlsMain.php');
session_start();
$query_rsMonth = "SELECT MIN(search_price) AS resi_min, MAX(search_price) AS resi_max, AVG(search_price) AS resi_avg FROM resi_data WHERE status = 'A' AND prop_sub_type = 'RESI' GROUP BY prop_sub_type";
$r_Month = mysqli_query($mlsMain, $query_rsMonth);
$row_rsMonth = mysqli_fetch_array($r_Month, MYSQLI_ASSOC);
$totalRows_rsMonth = mysqli_num_rows($r_Month);
$query_rsMonthS = "SELECT MIN(search_price) AS resi_min, MAX(search_price) AS resi_max, AVG(search_price) AS resi_avg FROM resi_data WHERE status = 'S' AND prop_sub_type = 'RESI' AND DATE(selling_date) BETWEEN '01-01-2020' AND '12-31-2020' GROUP BY prop_sub_type";
$r_MonthS = mysqli_query($mlsMain, $query_rsMonthS);
$row_rsMonthS = mysqli_fetch_array($r_MonthS, MYSQLI_ASSOC);
$totalRows_rsMonthS = mysqli_num_rows($r_MonthS);
$query_rsMonthSLy = "SELECT MIN(search_price) AS resi_min, MAX(search_price) AS resi_max, AVG(search_price) AS resi_avg FROM resi_data WHERE status = 'S' AND prop_sub_type = 'RESI' AND DATE(selling_date) BETWEEN '01-01-2018' AND '12-31-2018' GROUP BY prop_sub_type";
$r_MonthSLy = mysqli_query($mlsMain, $query_rsMonthSLy);
$row_rsMonthSLy = mysqli_fetch_array($r_MonthSLy, MYSQLI_ASSOC);
$totalRows_rsMonthSLy = mysqli_num_rows($r_MonthSLy);
$query_rsNeigh = "SELECT area_short, area_name, area_code, MIN(search_price) AS resi_min, MAX(search_price) AS resi_max, COUNT(area_short) AS area_num, AVG(search_price) AS resi_avg FROM resi_data, staor_areas WHERE resi_data.area_short=staor_areas.area_code AND status = 'A' AND prop_sub_type = 'RESI' GROUP BY area_short ORDER BY area_name ASC";
$r_Neigh = mysqli_query($mlsMain, $query_rsNeigh);
$row_rsNeigh = mysqli_fetch_array($r_Neigh, MYSQLI_ASSOC);
$totalRows_rsNeigh = mysqli_num_rows($r_Neigh);
?>
Solitude Lake Tahoe Real Estate Brokerage | Find Your Solitude
include("includes/header.php"); ?>