Share my solution


  • 0
    T
    # Write your MySQL query statement below
    select 
    t.Request_at Day,
    round(1-count(case t.Status when 'completed' then 1 else null end)/count(*),2) as `Cancellation Rate`
    from
    Trips t, Users u
    where t.Client_Id = u.Users_Id
    and u.Banned = 'No'
    and t.Request_at between '2013-10-01' and '2013-10-03'
    group by t.Request_at
    

Log in to reply
 

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