Re: SQl query - Mailing list pgsql-sql

From Matthew Horoschun
Subject Re: SQl query
Date
Msg-id B2A338AD-8066-11D7-9FF5-000393B3A702@canprint.com.au
Whole thread Raw
In response to SQl query  (Abdul Wahab Dahalan <wahab@mimos.my>)
List pgsql-sql
Hi Abdul,

> How do I make a query so that I get a result like
>
>  transporttype | #of transport
> ---------------+-------------
>  Lorry            |        4
>  Pickup          |        2

SELECT transporttype, count(*) FROM transport GROUP BY transporttype;

Cheers

Matthew.



pgsql-sql by date:

Previous
From: Abdul Wahab Dahalan
Date:
Subject: SQl query
Next
From: "Victor Yegorov"
Date:
Subject: Re: SQl query