Re: [SQL] [PERFORM] two queryes in a single tablescan

2007-10-17 Thread Stefano Dal Pra
On 10/17/07, Heikki Linnakangas <[EMAIL PROTECTED]> wrote: > Stefano Dal Pra wrote: > > suppose you have a large table tab and two (or more) queryes like this: > > > > SELECT count(*),A FROM tab WHERE C GROUP BY A; > > SELECT count(*),B FROM tab WHERE C GROUP BY B

[SQL] two queryes in a single tablescan

2007-10-17 Thread Stefano Dal Pra
Hi everybody, suppose you have a large table tab and two (or more) queryes like this: SELECT count(*),A FROM tab WHERE C GROUP BY A; SELECT count(*),B FROM tab WHERE C GROUP BY B; is there any way to get both results in a single query, eventually through stored procedure? The retrieved [count(*)