An SQL primer
How the query is evaluated:
- Rows are returned from ENUMTYPES.
- The GROUP BY puts them in sets by valuecount.
- COUNT(*) produces a count of the number of rows in each set.
- The SELECT statement displays the valuecount of each set and the number of rows in each set.