The following should get what you’re asking for:
INSERT INTO SOME_TABLE (SNO, USERID)
VALUES ((SELECT NVL(MAX(SNO)+1, 1)
FROM SOME_TABLE
WHERE USERID = &userid),
&userid);
where &userid
is your USERID value.
1
solved data not showing with sno