Add this code in your SQL select statement:
DENSE_RANK() OVER (PARTITION BY [COL1],[COL2] ORDER BY [COL3]) as Serial,
This will add a Unique Row Number to each group of Record. Use this "Serial" Column in Crystal Reports as your serial number.
To see an example goto the following link below:
https://javarevisited.blogspot.com/2016/07/difference-between-rownumber-rank-and-denserank-sql-server.html#axzz5cyzl9s8y