Use the "ROW_NUMBER" function to include a row number in your query. The syntax is:
ROW_NUMBER () OVER (ORDER BY insert the field name or names that you wish to order the results by)
This example sorts fields from the item_ext table by item_hrid, and adds a column for the row number (sequence number):
SELECT
ROW_NUMBER () OVER (ORDER BY ie.item_hrid) ASĀ seq_no,
ie.item_hrid,
ie.barcode,
ie.effective_location_name,
ie.effective_call_number
FROM folio_derived.item_ext AS ie
Result: