执行语句:
SELECT Request_at AS 'Day',
round(COUNT(CASE WHEN Status LIKE 'cancelle%' THEN 1 ELSE NULL END),2) #保留两位小数
#非禁止用户不仅包括乘客还包括司机
FROM Trips t JOIN Users u1 ON t.Client_Id = u1.Users_Id AND u1.Banned = 'No'
JOIN Users u2 ON t.Driver_Id = u2.Users_Id AND u2.Banned = 'No'
WHERE Request_at BETWEEN '2013-10-01' AND '2013-10-03'
GROUP BY Request_at;