T.Request_at as Day,
ROUND((SUM(IF(T.Status != 'completed',1,0))/count(T.Client_Id)),2) as
from Trips T
(select Users_Id from Users where Banned = 'No' AND Role = 'client') X
on T.Client_Id = X.Users_Id
where T.Request_at between '2013-10-01' and '2013-10-03'
group by T.Request_at;
Trips and Users simple solution (98ms)
Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.