Re: Re: Select from (select)
Posted in 2004
... Does not a "group by" and a "having" could serve on this situation? ...
Chucho!
-----Original Message-----
From: roeferr@ig.com.br (Ferronato)
To: informix-list@iiug.org
Date: 7 May 2004 10:20:12 -0700
Subject: Re: Select from (select)
Hi,
An option more:
create view view1 (col1, col2) as
select customer, sum(invoiced_amt) from customers
group by customer ;
select * from view1 where col2 > 1000
After that: Remember that "view1" exists in your database until you
"drop view" it ...
BR R.Ferronato
"Bent_Andy" <abent@aetinc.com> wrote in message news:<c7dpnr$a80$1@terabinaries.xmission.com>...
> try this:
>
> select customer, sum(invoiced_amt) as total_spent
> from customers
> group by customer
> having sum(invoiced_amt) > 1000>
> Andy
>
> ________________________________
>
> From: owner-informix-list@iiug.org
> [mailto:owner-informix-list@iiug.org] On Behalf Of Phillips, Rob
> Sent: Thursday, May 06, 2004 11:10 AM
> To: informix-list@iiug.org
> Subject: Select from (select)
>
>
>
> Is it possible to do a select from a select statement in
> Informix?
>
> Ex:
> Select Customer from (Select Customer, sum(invoiced_amt) as> total_spent from Customers group by Customer) where total_spent > 1000
>
>
>
> sending to informix-list
Jean Sagi
jeansagi@myrealbox.com
jeansagi@netscape.net
sending to informix-list