SELECT restaurants.regione, count(restaurants.id) AS count_regione FROM restaurants LEFT JOIN associations ON associations.restaurant_id = restaurants.id LEFT JOIN domains ON domains.id = associations.domain_id WHERE restaurants.enable='Y' AND ( domains.dominio='peritiindustriali.it' OR restaurants.categoria='peritiindustriali' ) GROUP BY restaurants.regione ORDER BY count_regione DESC ;
Content-type: text/html