2018-08-07 17:08:51 +00:00
|
|
|
select StartDate, TraficSourceID in (0) ? 'type_in' : 'other' as traf_type, sum(Sign)
|
|
|
|
from test.visits
|
2018-12-29 22:11:00 +00:00
|
|
|
where CounterID = 842440
|
2018-08-07 17:08:51 +00:00
|
|
|
group by StartDate, traf_type ORDER BY StartDate, traf_type
|