| |
SELECT TYPE as Type1 , type_id, (SELECT count( property_type ) FROM pt_property p
WHERE p.property_type = pt.type_id AND price >0 AND p.status =0 AND property_cat_type LIKE '%,48,%' and shop_id='2' ) AS Total_Number FROM pt_property_type pt WHERE shop_id='2' GROUP BY type_id
|
select bedrooms,count(bedrooms) as Total_Number from pt_property where property_cat_type LIKE '%,48,%' and shop_id='2' AND price >0 AND status =0 group by bedrooms order by bedrooms |
SELECT pr . * , (SELECT count( property_id ) FROM pt_property p WHERE p.price > pr.price_from
AND p.price <= pr.price_to AND property_cat_type LIKE '%,48,%' and shop_id='2' AND STATUS =0 ) AS Total_Number FROM price_range pr
|
SELECT pl1.parent_id, pl2.value, count( p.property_id ) AS Total_Number FROM pt_locations pl1 LEFT JOIN pt_locations pl2 ON pl1.parent_id = pl2.Location_id LEFT JOIN pt_property p ON pl1.location_id = p.property_location WHERE pl1.STATUS =1 AND pl1.location_id <>62 AND pl1.shop_id ='2' AND p.status =0 AND p.price >0 AND p.shop_id ='2' AND property_cat_type LIKE '%,48,%' GROUP BY pl2.value ORDER BY pl2.value
|