round(sum(a.is_cancelled)/count(a.Request_at), 2) "Cancellation Rate"
when t.Status != 'completed' then 1 else 0 end as is_cancelled
from Trips t
inner join Users u
on t.Client_Id = u.Users_id
where t.Request_at between '2013-10-01' and '2013-10-03' and u.Role = 'client' and u.Banned = 'No'
group by a.Request_at
Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.