Able to generate Sequence number using the following query
CREATE SEQUENCE seqno AS integer
START WITH 1;
SELECT t1.*,
(NEXT VALUE
FOR seqno) AS seqno
FROM
(SELECT l.TRANSACTION_ID,
l.HSN
FROM RWLINEITEM l
WHERE l.TRANSACTION_ID IN ('CS610-20-10003','CS610-20-10002')
GROUP BY l.TRANSACTION_ID,l.HSN) t1
this gives result
The requirement is to generate sequence number by Transaction and HSN for example
Is there any way to arrive this result. Using derby-10.13.1.1

