leetcode

Solution to some Leetcode problems written in C++
git clone git://git.dimitrijedobrota.com/leetcode.git
Log | Files | Refs | README | LICENSE

0262.sql (352B)


      1 SELECT request_at AS Day,
      2        ROUND(AVG(status LIKE 'cancelled%'), 2) AS "Cancellation Rate"
      3 FROM Trips
      4 WHERE client_id IN (
      5     SELECT users_id
      6     FROM Users
      7     WHERE banned = 'No'
      8   )
      9   AND driver_id IN (
     10     SELECT users_id
     11     FROM Users
     12     WHERE banned = 'No'
     13   ) 
     14   AND request_at BETWEEN "2013-10-01" AND "2013-10-03"
     15 GROUP BY request_at
     16