I have below records
The logic is index will be same till next price found, and count is just row number
I am trying to write the query, but unable to even start like how should I proceed, I was looking if loop is there but could not found.
If anyone could guide, that would be great help