I was wondering how I can generate an index for the items in the results of a query. so for example I have and list of order lines in an order when I want to generate a report I want the item index for every line just as shown below in bold.
select
product.name as "product.name",
e.amount as "amount",
e.price as "price",
e.amount * e.price as "sum"
from salesman$SaleProduct e
left join e.product product
where e.sale.id = ${sale}