On Fri, 9 Apr 2004 08:31:41 +0100, Tomasz Chilinski wrote
> select floor(time/86400) as date, taxvalue, SUM(value) as total from
> cash where type=3 group by date, taxvalue order by date,taxvalue
> DESC;
Coś takiego przeleci w postgresie i sqllite:
select floor(time/86400) as date, sum(if(cash.taxvalue=22.00,value,0)) as
tax22, sum(if(cash.taxvalue=7.00,value,0)) as tax7,
sum(if(cash.taxvalue=0.00,value,0)) as tax0,
sum(if(cash.taxvalue=NULL,value,0)) as taxfree from cash where type=3 group
by date order by date;
???
Pozdrawiam
Tomasz Chiliński