Ciao a tutti.
La mia situazione è la seguente:
Codice_P = A120 ===> Quantità = 9
Codice_P = A120 ===> Quantità = 9
Codice_P = A120 ===> Quantità = 9
Codice_P = A121 ===> Quantità = 15
Codice_P = A121 ===> Quantità = 15
Codice_P = A121 ===> Quantità = 15
Devo scaricare per Codice_P 3 unità sia per A120 che per A121.
Non mi riesce, perchè:
Codice_P = A120 ===> Quantità_tot = 27 - 3 = 24 invece la query riporta 18 ( 6 in meno );
Codice_P = A121 ===> Quantità_tot = 45 - 3 = 42 invece la query riporta 36 ( 6 in meno );
Che sto sbagliando?
Grazie

Rispondi quotando