Why cannot use Datediff()


  • 0
    X

    I use [datediff('2013-10-01', Request_at) in (0,1,2)] can only pass 7 tests, but [Request_at between '2013-10-01' and '2013-10-03'] works. What's the different?

    Select Request_at as day, Round(sum(Trips.Status like 'cancelled%')/count(*), 2) as cancellation_rate from Trips
    Left join Users on Users.Users_Id=Trips.Client_Id
    where datediff('2013-10-01', Request_at) in (0,1,2) and Users.Banned="No"
    group by Day;


Log in to reply
 

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