Hi All,
Sorry for the blast,
This query returns the close date for all the dates but i need only the last date. Is there a way i can use the last_date as a where condition to filter only those matchin records?
MATCH (c:Customer)-[:OWNS]->(a:Account) OPTIONAL MATCH (a)-[p:PURCHASED]->(f:Fund)-[:HAS_DAILY_CLOSE]->(fc:DayClose) WITH c, a, f, p, COLLECT(fc) AS fundCloses UNWIND fundCloses AS fc RETURN c.owner_name AS owner_name, a.account_type AS account_type, fc.ticker AS ticker, MAX(fc.date) AS last_date, fc.date as dt, //p.number_of_shares AS number_of_shares, //fc.close AS close, CEIL(p.number_of_shares * fc.close) AS value ORDER BY last_date DESCENDING;