:wave: I recently upgraded to 4.2 and am now seein...
# ask-questions
a
šŸ‘‹ I recently upgraded to 4.2 and am now seeing this error on percentile capped metrics:
within group ORDER BY clauses for aggregate functions must be the same
. • DB: redshift • failing query section:
Copy code
__capValue AS (
    SELECT
      PERCENTILE_CONT(0.999) WITHIN GROUP (
        ORDER BY
          m0_value
      ) AS m0_value_cap,
      PERCENTILE_CONT(0.999) WITHIN GROUP (
        ORDER BY
          m0_denominator
      ) AS m0_denominator_cap
    FROM
      __userMetricAgg
  )
The error arises from the capValue CTE calculating 2 percentiles with different order bys. If the pattern leveraged separate CTEs for each percentile, it would run Is this a known issues that is being worked on?
šŸ‘€ 1
šŸ™‹ā€ā™‚ļø 2
s
Thanks for flagging. We're investigating, and I'll update when I know more!
šŸ™ 3
f
hey guys, I am also getting the same issue. From my side, it seems to only happen for Ratio metrics that use percentile capping. Hope this helps! Thanks
s
It does look a bug was introduced. We'll investigate and introduce a fix, but we don't have a timeline yet.
f
Thanks Ryan appreciate it!
r
I think we'll need to roll back versions until that fix is rolled out. So any sense of timeline would be appreciated @strong-mouse-55694 šŸ™
s
Unfortunately, no timeline right now, but let me check in with the team.
a
šŸ‘‹ @strong-mouse-55694 - are there any updates on this or a ticket somewhere we can watch?
s
Let me check on it.