correzione
SELEZIONARE IL PRINCIPALE 50 * DA (
SELEZIONARE InvMovements.TrnYear, InvMovements.TrnMonth, InvMovements.StockCode,
InvMaster.Description, InvMovements.Customer, somma (InvMovements.TrnQty) TrnQty,
Somma (InvMovements.TrnValue) TrnValue, somma (InvMovements.CostValue) CostValue,
Somma (InvMaster.MaterialCost * InvMovements.TrnQty) COME materiale,
Somma (InvMaster.LabourCost * InvMovements.TrnQty) COME lavori,
Somma (InvMaster.SubContractCost * InvMovements.TrnQty) COME OSP,
Somma (InvMaster.VariableOverhead * InvMovements.TrnQty) COME VOH,
Somma (InvMaster.FixOverhead * InvMovements.TrnQty) COME FOH,
somma (InvMovements.TrnValue - InvMovements.CostValue) COME margine,
Da InvMaster InvMaster INTERNO UNIR
InvMovements InvMovements SU InvMaster.StockCode = InvMovements.StockCode
DOVE (InvMovements.MovementType = “S ") E (InvMovements.TrnYear = 2010) E (InvMovements.TrnMonth = 6)
GRUPPO da InvMovements.TrnYear, InvMovements.TrnMonth, InvMovements.StockCode,
InvMaster.Description, InvMovements.Customer
) QUADRATO
ORDINE dal desc del TrnValue