Skip to content

Commit

Permalink
fix(analytics): remove first_attempt group by in Payment Intent old m…
Browse files Browse the repository at this point in the history
…etrics (#6627)
  • Loading branch information
tsdk02 authored Nov 22, 2024
1 parent 500fcd3 commit 54e393b
Show file tree
Hide file tree
Showing 7 changed files with 7 additions and 32 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,6 @@ where
})
.switch()?;

query_builder
.add_select_column("attempt_count == 1 as first_attempt")
.switch()?;

query_builder.add_select_column("currency").switch()?;

query_builder
Expand Down Expand Up @@ -102,11 +98,6 @@ where
.switch()?;
}

query_builder
.add_group_by_clause("attempt_count")
.attach_printable("Error grouping by attempt_count")
.switch()?;

query_builder
.add_group_by_clause("currency")
.attach_printable("Error grouping by currency")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,6 @@ where
})
.switch()?;

query_builder
.add_select_column("(attempt_count == 1) as first_attempt".to_string())
.switch()?;

query_builder
.add_select_column(Aggregate::Min {
field: "created_at",
Expand Down Expand Up @@ -90,11 +86,6 @@ where
.switch()?;
}

query_builder
.add_group_by_clause("first_attempt")
.attach_printable("Error grouping by first_attempt")
.switch()?;

if let Some(granularity) = granularity.as_ref() {
granularity
.set_group_by_clause(&mut query_builder)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ where
.switch()?;

query_builder
.add_select_column("attempt_count == 1 as first_attempt")
.add_select_column("(attempt_count = 1) as first_attempt")
.switch()?;
query_builder.add_select_column("currency").switch()?;
query_builder
Expand Down Expand Up @@ -98,8 +98,8 @@ where
}

query_builder
.add_group_by_clause("attempt_count")
.attach_printable("Error grouping by attempt_count")
.add_group_by_clause("first_attempt")
.attach_printable("Error grouping by first_attempt")
.switch()?;
query_builder
.add_group_by_clause("currency")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ where
.switch()?;

query_builder
.add_select_column("attempt_count == 1 as first_attempt")
.add_select_column("(attempt_count = 1) as first_attempt")
.switch()?;

query_builder
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ where
.switch()?;

query_builder
.add_select_column("(attempt_count == 1) as first_attempt".to_string())
.add_select_column("(attempt_count = 1) as first_attempt".to_string())
.switch()?;

query_builder
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ where
.switch()?;

query_builder
.add_select_column("attempt_count == 1 as first_attempt")
.add_select_column("(attempt_count = 1) as first_attempt")
.switch()?;

query_builder.add_select_column("currency").switch()?;
Expand Down Expand Up @@ -105,7 +105,7 @@ where
.switch()?;
query_builder
.add_group_by_clause("currency")
.attach_printable("Error grouping by first_attempt")
.attach_printable("Error grouping by currency")
.switch()?;
if let Some(granularity) = granularity.as_ref() {
granularity
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,6 @@ where
})
.switch()?;

query_builder
.add_select_column("attempt_count == 1 as first_attempt")
.switch()?;
query_builder.add_select_column("currency").switch()?;
query_builder
.add_select_column(Aggregate::Min {
Expand Down Expand Up @@ -98,10 +95,6 @@ where
.switch()?;
}

query_builder
.add_group_by_clause("first_attempt")
.attach_printable("Error grouping by first_attempt")
.switch()?;
query_builder
.add_group_by_clause("currency")
.attach_printable("Error grouping by currency")
Expand Down

0 comments on commit 54e393b

Please sign in to comment.