1
I have the appointment that returns the results. I would like to add an incremental number to show the records from 1 to the end, as if it were a new column.
select *, sum(valor) as ValorSoma, count(pedido) as QtdPedido from tb_vendas
where idvendas > 0
and data_venda between '05/10/2015' and '11/04/2016'
and vendedor =’’
group by cliente
order by QtdPedido desc
Note: I saw that I had an identical question only for another bank (Postgre), but even though the answer was the same I assumed it would be correct not to mark this question as duplicate and answer.
– DH.