The select PARTNO='048001055', attribute='ABCD', ID='1000242451', number='22', amount='1800' UNION ALL
The select PARTNO='948001055', attribute=', ID='1000242452', number='22', amount='600' UNION ALL
The select PARTNO='048001055', attribute='ABCD', ID='1000242453', number='6', amount='400' UNION ALL
The select PARTNO='948001055', attribute=', ID='1000242454', number='6', amount='366' UNION ALL
The select PARTNO='012001079', attribute='powerpoint', ID='1000242455', number='73', amount='900') f
- the result to
048001055 the ABCD 1000242451 22 2400 (note 1800 + 600)
048001055 the ABCD 1000242453 22 766 (note 400 + 366)
Powerpoint 012001079, 1000242455, 73, 900
CodePudding user response:
According to the title you describe, the first and the second is not the same as the ID of the data, why merger summation, the third and fourth,CodePudding user response: