Re: count and group by question

From: Ryan Mahoney <ryan(at)paymentalliance(dot)net>
To: Hannu Krosing <hannu(at)tm(dot)ee>
Cc: Dann Corbit <DCorbit(at)connx(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: count and group by question
Date: 2002-06-20 02:07:50
Message-ID: 1024538870.9860.265.camel@ryan.flowlabs.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2002-06-20 02:43:20 Re: COPY syntax improvement
Previous Message Hiroshi Inoue 2002-06-20 01:38:27 Re: SetQuerySnapshot, once again