We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent beb6309 commit 9298899Copy full SHA for 9298899
scripts/database/T/Trips and Users/Trips and Users.sql
@@ -1,19 +1,20 @@
1
-with stats as (
2
- select
3
- Request_at,
+-- Runtime: 518 ms (Top 71.66%) | Memory: 0 MB (Top 100.00%)
+ith stats as (
+ select
4
+ Request_at,
5
T.Status <> 'completed' as IsCancelled
- from Trips T
6
- join Users C on (Client_Id = C.Users_Id and C.Banned = 'No')
7
- join Users D on (Driver_Id = D.Users_Id and D.Banned = 'No')
+ from Trips T
+ join Users C on (Client_Id = C.Users_Id and C.Banned = 'No')
8
+ join Users D on (Driver_Id = D.Users_Id and D.Banned = 'No')
9
where
10
Request_at between '2013-10-01' and '2013-10-03'
11
)
-select
12
+select
13
Request_at as Day,
14
Round(
15
cast(sum(IsCancelled) as real) / cast(count(*) as real),
16
17
) as 'Cancellation Rate'
18
from stats
19
group by Request_at
-;
20
+;
0 commit comments