Inner Join solution

  • 0
    select t.Request_at Day,round(sum(case when status like 'cancelled%' then 1 else 0 end)/count(status),2) 'Cancellation Rate' 
    from Trips t, Users u 
        t.Client_Id = u.Users_Id and u.Banned != 'Yes' 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.