I want to take a column with values that repeat multiple times and get that value only once and store it for later use, but at the same time I would like to get another valu
INSERT INTO TABLENAME (A, B, C)
SELECT A, B, C + 1
FROM(
select A, B, C, MAX(C) OVER(PARTITION BY A, B) AS MAXC
FROM TABLENAME
) AS NEW_ROWS
WHERE C = MAXC