P
Paul Brown
I have a single table containing information about people such as forenames,
surnames, age, etc. I want to create a query that returns two columns of
information: a distinct list of surnames, and a count of how many times each
distinct surname appears in the main table.
Each of these elements is easy enough to achieve on its own with a SELECT
DISTINCT or SELECT COUNT(DISTINCT) style query, but how can I combine them
to get what I want?
surnames, age, etc. I want to create a query that returns two columns of
information: a distinct list of surnames, and a count of how many times each
distinct surname appears in the main table.
Each of these elements is easy enough to achieve on its own with a SELECT
DISTINCT or SELECT COUNT(DISTINCT) style query, but how can I combine them
to get what I want?