cancel
Showing results for 
Search instead for 
Did you mean: 

Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.

Row number with partitioned in cypher

Hi Team,

Can anyone let me know how can I convert below SQL in cypher

SQL - Select * ,row_number() over(partitioned by column 1, column 2 order by column 3, column 4) as ROW_ID From Table1

Thanks,
Varun

2 REPLIES 2

I think it would be a good idea to review the basic concepts of Cypher/Neo4j in the Cypher documentation, as well as aggregations.

Can you also add what you've tried so far?

Also, as we're more used to Cypher than SQL here, a verbal description of the query would be helpful, as I'm unsure whether you mean for ROW_ID to be distinct per row, or if you mean to have ROW_ID be specific for the row with respect to your groupings by column 1 and 2, in which case multiple rows will have the same ROW_ID.

can you remind us again, given some input data what the expected output of this would look like?