group by query with string manipulation -
07-06-2003
, 03:53 PM
------=_NextPart_000_0021_01C343DF.28894A80
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
I'm running this query to get a count of categories I have in a field =
that contains aircraft categories.
SELECT substring(category,10), count(*)
FROM `links` where category like 'Aircraft/Sales%'
group by category order by category
and getting these results:
---------------------------
Sales/Dealers 7
Sales 203
I would like to get these results:
-------------------------------------
Sales 210
but am not sure how to manipulate the category field to do this. Thanks =
in advance.
------=_NextPart_000_0021_01C343DF.28894A80-- |