select locality,postal_code from calles where administrative_area_level_2='Communauté-Urbaine-de-l'Outaouais' and country_code='CA' group by locality order by locality You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'Outaouais' and country_code='CA' group by locality order by locality' at line 1