* Abdul Wahab Dahalan <wahab@mimos.my> [07.05.2003 11:52]:
> If I've a transport table like this:
> transporttype | transportid
> ---------------+-------------
> Lorry | 1037
> Pickup | 1038
> Lorry | 1040
> Lorry | 1045
> Pickup | 1046
> Lorry | 1047
>
> How do I make a query so that I get a result like
>
> transporttype | #of transport
> ---------------+-------------
> Lorry | 4
> Pickup | 2
selecttransporttype,count(transporttype)
fromyour_table
group bytransporttype;
--
Victor Yegorov