By using group by c3.source,getting below result.
I am trying to add condition in group by clause such that 3 rows should come

1)0+3 source result should merged

50+48      52+75      99+102

2) 4 source result contains ids having source 4 and url like '%daniweb%'

source 0_to_7_days 7_to_14_days more_then_15_days
0 50 52 99
3 48 75 102
4 6 4 3
5 0 1 3

Hi Jacob,

Please supply more information

A full SQL query would be ideal

You may use SUM() to total the number. You could try something similar to below (not tested!)...

SELECT SUM(0_to_7_days) as ZeroSeven, SUM(7_to_14_days) as SevenFourteen, SUM(more_then_15_days) as FifteenPlus FROM c3.source WHERE c3.source=0 or c3.source=3

PS: Your word more_then_15_days should BE more_than_15_days (notice the 'a', not 'e').

PSS: OOps, didn't realize that the original post is 5 months old!

Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.18 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.