Friday, September 7, 2007

GROUP BY

In a GROUP BY statement only distinct values are shown for the column in the GROUP BY.
This example shows the continents hosting the Olympics with the count of the number of games held.

SELECT continent, COUNT(yr) FROM games
GROUP BY continent;

No comments: