Conditional Group By #18260
Closed
MohMehrnia
started this conversation in
General
Replies: 3 comments 3 replies
-
The issue is that you are trying to first filter the results then group them, but that would mean that we need to do the aggregation on the fly. Instead, write the query like so:
That allows RavenDB to do the appropriate aggregations ahead of time and give you the results quickly, regardless of the data size. |
Beta Was this translation helpful? Give feedback.
0 replies
-
Thanks, I need the below scenario group by state, sort with log date, and select first record in each record My Sample Document is
|
Beta Was this translation helpful? Give feedback.
3 replies
-
Probably this:
https://ayende.com/blog/197637-A/production-postmortem-your-math-is-wrong-recursion-doesnt-work-this-way
…On Mon, Apr 8, 2024 at 2:56 AM Mohammad Mehrnia ***@***.***> wrote:
Why some record not in results!!!!!
—
Reply to this email directly, view it on GitHub
<#18260 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAA4RM4R3VUSWVSR2QL4HTTY4HMJ5AVCNFSM6AAAAABE24R6USVHI2DSMVQWIX3LMV43SRDJONRXK43TNFXW4Q3PNVWWK3TUHM4TAMZZGMYTS>
.
You are receiving this because you commented.Message ID:
***@***.***>
--
<https://ravendb.net/> *OREN EINI*
*CEO & Founder*
***@***.***
+972-52-548-6969
www.ravendb.net <https://ravendb.net/>
<https://www.linkedin.com/company/ravendb/> <https://twitter.com/ravendb>
<https://github.com/ravendb>
<https://ravendb.net/emailsignature/displayeventpage>
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Why this code not work?
Beta Was this translation helpful? Give feedback.
All reactions