Row number
The rownumber function returns an integer number which is different for each row of the result set.
The syntax of the function is
rownumber()
Example
# Get top 10 regions by per capita sales SELECT rownumber() AS rank, region, sales/population AS per_capita_sales FROM sales ORDER BY per_capita_sales DESC LIMIT 10;