what is wrong in this code? I am getting error
Submission is not going through
with base_tab as (
select b.request_at day,case when status like '%cancel%' then 1 else 0 end as cancel,
case when status not like '%cancel%' then 1 else 0 end as complete
from users a,trips b
where a.banned = 'NO'
and b.client_id = a.users_id
and b.request_at between '2013-10-01' and '2013-10-03')
select Day Day,round(sum(cancel)/(sum(cancel)+sum(complete)),2) "Cancellation Rate"
from base_tab
#where 1<=(select sum(cancel) from base_tab)
group by day;