Does this help
Here is my test table data.
ID;DATE;VALUE
1;"2009-03-13";5
2;"2009-03-13";2
3;"2009-03-11";1
4;"2009-03-11";2
5;"2009-03-11";3
SELECT mydate AS day,
SUM(CASE WHEN id % 2 = 1 THEN value END) AS sum_odd,
SUM(CASE WHEN id % 2 = 0 THEN value END) AS sum_even
FROM xyz
GROUP
Hi,
I have a table: (date timestamp, id integer, value integer)
What Iam trying to do is to get a result that looks like this:
day sum_oddsum_even
2009-01-01 656578867
2009-01-02 876785 87667
basically a need to combine these two queries into one:
SELECT