To count the line in a query, use row_number(). The keyword partition allow to reset the counter:
example:
You have to use convert as row_number() is a bigint in SQL and SAP doesn’t handdle this type of value.
Enter the destination URL
Or link to existing content