Subject Re: [firebird-support] IN, sub-select and select distinct
Author Jerome Bouvattier
Thanks for your help Arno.
And please forgive me for the two previous empty responses. I guess I need
some OE training...
Comments below...

> Create for example a VIEW V_SYS_IDLISTS with :
>
> SELECT DISTINCT
> GROUP_ID,
> ID
> FROM
> SYS_IDLISTS
>
> and use this view in a join
>
> SELECT
> pres.productid
> FROM
> presence pres
> join product prod on (pres.productid = prod.id)
> join V_SYS_IDLISTS v on (v.ID = pres.outletid)
> where
> (pres.valuedate >= '2003-09-01') and (pres.valuedate < '2003-11-01')
>

But this won't give me the same resultset. You set the distinct on
SYS_IDLISTS, I need it on "pres.productid".

Any other hint ?

--
Jerome