This message was deleted.
# general
s
This message was deleted.
p
Just ingest them one more time.
j
Are the updates coming in via the real-time ingestion? Or separately via batch processes?
c
Hey @John Kowtko Data Ingestion is via Real-Time and update data is also received in real-time. @channel We have the following data being pumped into Druid (considering a simple example) orderId, status, time, value 1, false, 2023-11-010100:00, 2 1, true, 2023-11-010100:00, 3 2, false, 2023-11-010100:00, 4 2, false, 2023-11-010100:00, 5 3, true, 2023-11-010100:00, 7 And Data for any orderId can be inserted with updated status. We are looking for an effective way to get aggregations like "Number of OrderIds which are marked true and Number of OrderIds which are marked as *false*" Note that we would like to consider only the latest entry of orderId for this aggregation. Thanks in Advance.
j
Hi Chandni, The Latest() function should allow you to retrieve the last field value over a given time range. So if you use Latest() in an aggregate subquery, then in the parent query you can use a second level aggregate to get the counts for each "latest" status. This is fairly straightforward to do in SQL ... if you need help forming the query please post what you come up with so we can take a look. thanks. John
c
Thanks John. I was trying to wrap my head around the concept of versions. Any way we can use versions and limit druid to use only latest entry basis version by default and return the result without having to do sub level query aggregations.