I’ve a query where I’m bucketing by values in a column. I want to calculate the percentage of rows that contain said value for that column as compared to all the rows. Essentially, want to do something like
Copy code
SELECT Count(*), SUM(COUNT(*)) FROM ... GROUP BY COL_1
The above syntax seems invalid for Pinot/calcite. What’s the best way to express this?
Anand Sainath
02/14/2022, 5:59 PM
Realized I posted this late yesterday. Bumping to get some 👀
j
Johan Adami
02/14/2022, 6:42 PM
this is only doable with window functions or joins/subqueries. pinot does not support either. i believe you’d have to send 2 queries and do the math on the client side