SQl query

From: Abdul Wahab Dahalan <wahab(at)mimos(dot)my>
To: pgsql-sql(at)postgresql(dot)org
Subject: SQl query
Date: 2003-05-07 08:20:21
Message-ID: 3EB8C1C5.4745E77E@mimos.my
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

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

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Matthew Horoschun 2003-05-07 08:34:20 Re: SQl query
Previous Message Ries van Twisk 2003-05-07 07:34:46 Re: UNIQUE boolean: only one row may be "true"