Skip to content

Commit 9298899

Browse files
committed
Runtime: 518 ms (Top 71.66%) | Memory: 0 MB (Top 100.00%)
1 parent beb6309 commit 9298899

File tree

1 file changed

+9
-8
lines changed

1 file changed

+9
-8
lines changed
Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,20 @@
1-
with stats as (
2-
select
3-
Request_at,
1+
-- Runtime: 518 ms (Top 71.66%) | Memory: 0 MB (Top 100.00%)
2+
ith stats as (
3+
select
4+
Request_at,
45
T.Status <> 'completed' as IsCancelled
5-
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')
6+
from Trips T
7+
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')
89
where
910
Request_at between '2013-10-01' and '2013-10-03'
1011
)
11-
select
12+
select
1213
Request_at as Day,
1314
Round(
1415
cast(sum(IsCancelled) as real) / cast(count(*) as real),
1516
2
1617
) as 'Cancellation Rate'
1718
from stats
1819
group by Request_at
19-
;
20+
;

0 commit comments

Comments
 (0)