Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.
08-02-2019 12:09 AM
i have a node with few columns and below are few of the results in it
Email1 Email2 ContactDateInStr
abc@test.com xyz@test.com 20190604
abc@test.com xyz@test.com 20190512
suv@test.com abc@test.com 20190604
def@test.com xyz@test.com 20190515
The result should be below where i am considering combination of Email1 and Email2 and taking only latest date(string) .
Email1 Email2 ContactDateInStr
abc@test.com xyz@test.com 20190604
suv@test.com abc@test.com 20190604
def@test.com xyz@test.com 20190515
any suggestion?
Solved! Go to Solution.
08-02-2019 12:24 AM
Yes, after the match, after you've projected out variables, just use the max()
aggregation.
...
WITH email1, email2, max(contactDateInStr) as latestDate
...
Aggregations are with respect to the non-aggregation variables which become the grouping key, so this is the max contact date string per each distinct email1, email2 combination.
08-02-2019 12:24 AM
Yes, after the match, after you've projected out variables, just use the max()
aggregation.
...
WITH email1, email2, max(contactDateInStr) as latestDate
...
Aggregations are with respect to the non-aggregation variables which become the grouping key, so this is the max contact date string per each distinct email1, email2 combination.
08-02-2019 02:02 AM
Yes , this would work if i just need the combination and max of date. Thanks!
02-19-2022 12:43 AM
hello everyone, I have a final result see below.. here i have UNION matched the 2 queries. but i required only the last result based on the nodetype. how to do this ??
label value nodetype
"App-PolicyManagement" "App-PolicyManagement" "Application"
"App-CustomerManagement" "App-CustomerManagement" "Application"
"SSMAP" "SSMAP" "Screen"
All the sessions of the conference are now available online