Why does this query have a syntax error?

  • 0

    Anyone knows what is wrong with the following query? It shows syntax error near "as Rate". Thanks!

    select t1.Request_at as Day, round(count(t1.*)/count(t2.*),2) as Rate 
    from Trips t2, (Trips t1 join Users u on t1.Client_Id = u.Users_Id) t 
    where t1.Status = 'cancelled_by_client' 
    and u.Banned = 'No' 
    and t1.Request_at between '2013-10-01' and '2013-10-03' 
    and t2.Request_at between '2013-10-01' and '2013-10-03';

Log in to reply

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