Depends on what you mean by "in the database". If the data are kept in one
table, then the following would do it:
select
Platform
, count (*)
from
MyTable
group by
Platform
--
Tom
---------------------------------------------------------------
Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
SQL Server MVP
Columnist, SQL Server Professional
Toronto, ON Canada
www.pinnaclepublishing.com/sql
"Andrew Banks" <ba****@nojunkblueyonder.co.uk> wrote in message
news:ks*******************@news-text.cableinet.net...
I have a table of product orders. It contains a row for "platform" and I
need to return how many times each platform is listed in the DB
Example data for platform could be:
XBOX
XBOX
XBOX
PLAYSTATION
PLAYSTATION
GAMECUBE
PLAYSTATION
I'd like the data to be returned as
XBOX - 3
PLAYSTATION - 3
GAMECUBE - 1
How would I go about doing this please?