Share my codes at 186ms

  • 0
    select a.Request_at as Day, round( (select count(*) from Trips as b left join Users as c on b.Client_Id = c.Users_Id where (b.Status = 'cancelled_by_client' or b.Status ='cancelled_by_driver') and c.Banned = 'No' and b.Request_at = a.Request_at)/count(a.Status),2) as Cancellation_Rate
    from Trips as a left join Users as d
    on a.Client_Id = d.Users_Id
    where d.Banned = 'No' and a.Request_at >= date("2013-10-01") and a.Request_at <= date("2013-10-03")
    group by 1
    order by 1;

Log in to reply

Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.