I'm not sure exactly how to phrase this question but... I'm working with an existing database and the structure is something I can't change. I want to write a query which assigns a unique id to each group of a the same block value in the results returned by my query.
An example might be helpful! If I have a SQL statement such as
SELECT Id, Title, Block, Order FROM TableName ORDER BY Order ASC
that returns the result:
Is there any fairly straightforward way to generate a result which gives a unique id to each block of results, something like:
I hope this is clear enough :) Thanks in advance for any help!