File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -45,14 +45,14 @@ defmodule Algora.Analytics do
45
45
u . id
46
46
|> count ( )
47
47
|> filter (
48
- u . inserted_at < ^ from and u . inserted_at >= ^ period_start and ( u . status == :active or u . status == :paid )
48
+ ( u . status == :active or u . status == :paid ) and u . inserted_at < ^ from and u . inserted_at >= ^ period_start
49
49
) ,
50
50
success_previous:
51
51
u . id
52
52
|> count ( )
53
53
|> filter (
54
- u . inserted_at < ^ period_start and u . inserted_at >= ^ previous_period_start and
55
- ( u . status == :active or u . status == :paid )
54
+ ( u . status == :active or u . status == :paid ) and
55
+ u . inserted_at < ^ period_start and u . inserted_at >= ^ previous_period_start
56
56
)
57
57
}
58
58
@@ -69,7 +69,7 @@ defmodule Algora.Analytics do
69
69
joined_at: u . inserted_at ,
70
70
total_contracts: c . id |> count ( ) |> filter ( c . inserted_at >= ^ period_start ) ,
71
71
successful_contracts:
72
- c . id |> count ( ) |> filter ( c . status == :active or ( c . status == :paid and c . inserted_at >= ^ period_start ) ) ,
72
+ c . id |> count ( ) |> filter ( ( c . status == :active or c . status == :paid ) and c . inserted_at >= ^ period_start ) ,
73
73
last_active_at: u . updated_at ,
74
74
avatar_url: u . avatar_url
75
75
}
You can’t perform that action at this time.
0 commit comments