This is the simplest one among the hard questions...

  • 0

    This could be really simple as:

    select Request_at as Day, 
    round(count(If(Status like 'cancelled_by%' and Banned = 'No', Status, NULL))/count(If(Banned = 'No', Status, NULL)),2) as 'Cancellation Rate'
    from Trips t join Users u
    on t.Client_Id = u.Users_Id
    where Request_at between '2013-10-01' and '2013-10-03'
    group by Request_at

Log in to reply

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