samedi 16 juillet 2016

filter culmns in sql

from wolrd database available right here http://downloads.mysql.com/docs/world.sql.gz i want to display only the names of the countries speaking more than 5 languages :

i've tried this :

SELECT country.Name, COUNT(countrylanguage.Language) as languages FROM country, countrylanguage WHERE country.Code = countrylanguage.CountryCode Group BY country.Name HAVING languages >= 6

but the problem is that is it shows the number of languages as well, what i want is only the culumn country.Name .

Thank you.

Aucun commentaire:

Enregistrer un commentaire