Error on run query : SELECT count(*) AS count,, ref_country.fr_female FROM sister_city INNER JOIN ref_france_city ON sister_city.cityid = ref_france_city.cityid INNER JOIN ref_france_department ON ref_france_city.department_code = ref_france_department.department_code INNER JOIN ref_country ON = ref_country.iso2 INNER JOIN ref_france_region ON ref_france_department.region_code = ref_france_region.region_code WHERE IN () AND ref_france_department.url = 'Indre-et-Loire' GROUP BY ; You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ') AND ref_france_department.url = 'Indre-et-Loire' GROUP BY sister_city.cou' at line 12