mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-18 05:32:52 +00:00
5 lines
190 B
MySQL
5 lines
190 B
MySQL
|
select StartDate, TraficSourceID in (0) ? 'type_in' : 'other' as traf_type, sum(Sign)
|
||
|
from test.visits
|
||
|
where CounterID = 160656
|
||
|
group by StartDate, traf_type ORDER BY StartDate, traf_type
|