A
The population attribute may not be used in such a grouped query.
close B
This will work. The continent field is OK as it is the "grouping" field,
the population field has had a "agregating" function: SUM applied.
close C
Neither of the fields name not population is permitted
in a grouped query such as this.
close D
The name field may not be used in a grouped query like this.
close E
One of the options given IS valid SQL.
close
Given a relation country(name, continent, population) which of the following is a valid SQL statement?
- SELECT continent, population FROM country GROUP BY continent
- SELECT continent, SUM(population) FROM country GROUP BY continent
SELECT name, population FROM country GROUP BY continent
- SELECT name, SUM(population) FROM country GROUP BY continent
None of the above OR more than one of the above
|