Posted by Matthias Hoys on 09/28/99 11:19
"Xavier Houppertz" <houppertzx@yahoo.com> wrote in message
news:wbSte.287781$Uh3.71153@biebel.telenet-ops.be...
> Hello,
>
> I am experiencing problems in writing an sql query.
> I would like to do a select count (pn_uid) where pn_did > 10 AND where
> pn_did > 500 goup by and sort by
>
> Of course if i do this I get everything that is above 500 (say 75)
>
> But I would like a result like Uid >10 >500
> 18 25 75
>
> I tried UNION, but I get two lines
> Uid Tot
> 18 25
> 18 75
>
> And i would like one ....
>
> Ideas please ?
>
> thanks,
> Xavier
>
>
Maybe you can do a SELECT on your UNION query ?
SELECT ... FROM
(SELECT ... FROM ... WHERE pn_did > 10
UNION
SELECT ... FROM ... WHERE pn_did > 500
)
Navigation:
[Reply to this message]
|