Re: count and group by question - Mailing list pgsql-hackers

From Ryan Mahoney
Subject Re: count and group by question
Date
Msg-id 1024538870.9860.265.camel@ryan.flowlabs.com
Whole thread Raw
In response to Re: count and group by question  (Hannu Krosing <hannu@tm.ee>)
List pgsql-hackers
Perfect!  That's just what I needed!

Thanks so much

-r

> select count(*) from (
>     SELECT
>        to_char(pa_shopping_cart.delivery_date, 'FMMM/FMDD/YY') AS
>     delivery_date,
>        pa_products.product_name AS product_name,
>        pa_orders.order_state AS state,
>        count(*) AS count
>     FROM
>       pa_shopping_cart,
>       pa_products,
>       pa_orders
>     WHERE
>       pa_shopping_cart.order_id = pa_orders.order_id AND
>       pa_shopping_cart.product_id = pa_products.product_id
>     GROUP BY
>       pa_shopping_cart.delivery_date,
>       pa_products.product_name,
>       pa_orders.order_state
> ) original_query
> 
> 
> 
> ----------------
> Hannu



pgsql-hackers by date:

Previous
From: Hiroshi Inoue
Date:
Subject: Re: SetQuerySnapshot, once again
Next
From: Bruce Momjian
Date:
Subject: Re: COPY syntax improvement