I have the table customer which conatins data of customer in multiple months.
My task is to show the repeated customer with there details in which i need the fetch the rows from second occurrences but the my query is fetching the first occurrence also Customer table
and i want a query to get this result. Result
SELECT * FROM ( SELECT ROW_NUMBER()OVER(PARTITION BY customer_id ORDER BY Id ASC) Sno,* FROM @tbl ) a WHERE a.Sno > 1