Map
01/04/2022, 1:35 PMt1
with 200+ columns A
, B
, `C1`…`C200`. When I do select max(A) from table group by B'
, I get the max A for each B. Is there to get the corresponding `C1`…`C200` for each max(A) per B? That is to say, how to achieve `select max(A), C1, ..., C200 from table group by B`without aggregating on C
or grouping by C
?Atri Sharma
01/04/2022, 1:42 PMMap
01/04/2022, 1:46 PMAtri Sharma
01/04/2022, 1:59 PMMap
01/04/2022, 2:05 PMAtri Sharma
01/04/2022, 2:17 PMJeff Moszuti
01/04/2022, 2:19 PMselect max(A), lastwithtime(C, A, 'datatype') from table group by B
. Further details about lastwithtime can be found at https://docs.pinot.apache.org/users/user-guide-query/supported-aggregationsAtri Sharma
01/04/2022, 2:21 PMMap
01/04/2022, 2:31 PMA
is not unique in our caseAtri Sharma
01/04/2022, 2:48 PMMap
01/04/2022, 3:23 PMlastwithtime(C, A), 'datatype'
would return the same valueJeff Moszuti
01/05/2022, 1:16 PMAtri Sharma
01/05/2022, 1:17 PMMap
01/06/2022, 4:07 PMC
columns in my case, do I have to resort to hundreds of lastwithtim()
? Is there a more efficient way to do this in Pinot?Jeff Moszuti
01/06/2022, 4:37 PMMap
01/06/2022, 5:42 PM