To add a temporary, auto-incrementing index to an entire view, add this to your SELECT statement:
SELECT row_number() OVER () as auto_ndx
To increment an integer separately for different "entities" within a data set (for instance for each meter in a time-series of meter readings) add the PARTITION BY caluse to the OVER parameters and include the entity identity field (in this example, the meter serial number).
SELECT meter_sn, row_number() OVER (PARTITION BY meter_sn) FROM meterreadings
If the order of the incrementing integer matters, add an ORDER BY also. This example forces the incrementing integers to count up in order based on the meter reading collect date
SELECT meter_sn, collect_date,
row_number() OVER (PARTITION BY meter_sn ORDER BY collect_date)
FROM meterreadings