implydata / plyql

MySQL-like queries for Druid built on top of Plywood

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

is CASE WHEN supported?

hwhmusic opened this issue · comments

[Err] 1064 - SQL parse error: Expected ",", ";", "FROM", "GROUP", "HAVING", "LIMIT", "ORDER", "WHERE", or end of input but "f" found. on 'select f_corp_id,f_user_id,f_in_out_type,
case when f_status = 0 && f_Calltime>0 then 1 else 0 end as connect,
case when f_crm_id < 80000000 then 0 else 1 end as custome,
sum(f_Calltime),count(1)
from tel_record2
where f_Endtime between '2017-05-15 00:00:00' and '2017-05-15 23:59:59'
group by f_corp_id,f_user_id,f_in_out_type,connect,custome;'

or like: if(exp,v1,v2) as c_name