I have the following table:
ENVIO ORDEN LOTE
00011 1 6666
00011 2 6666
00012 3 7777
00012 4 7777
00012 5 8888
00013 6 9999
I need to get from that table, the following:
ENVIO CTDORDEN LOTE
00011 2 6666
00012 2 7777
00012 1 8888
00013 1 9999
I have to get all the different batches, and count how many orders there are in each batch and each shipment.
I try to make a SELECT DISTINCT
but I do not give with the formula ....
thanks for the help.