Query: | SELECT COUNT(`T1`.`spaces`) AS `Number` , `T1`.`spaces` FROM `fl_listings` AS `T1` LEFT JOIN `fl_categories` AS `T3` ON `T1`.`Category_ID` = `T3`.`ID` WHERE `T1`.`Status` = 'active' AND `T1`.`Sub_status` <> 'invisible' AND `T3`.`Type` = 'listings' AND `T1`.`spaces` <> '' AND `T1`.`spaces` <> '0' AND `T1`.`sale_rent` = '2' AND `T1`.`time_frame` = '2' AND `T1`.`booking_module` = '1' AND `T1`.`spaces` = '5' AND `T1`.`heating` = 'Autonomos' GROUP BY `T1`.`spaces` HAVING COUNT(`T1`.`spaces`) > 0 ORDER BY `Number` DESC |