表A:如何在sp。中编写查询?
Unique_code Deal_No Option Aount
1234 155-12 Sell 100
1234 155-12 Buy 200
5678 155-13 Sell 300
9101 155-14 Buy 400
极品:
Unique_code Deal_No Option Aount
1234 155-12 Sell 300
5678 155-13 Sell 300
9101 155-14 Buy 400
我需要的uniq的代码的总和。
你尝试过这么远吗?你能否粘贴你的代码,即使它不完整。 –
我试着将表B中的数据转储作为临时表。和Inner加入到unique_code的两个表格基础上。但行增加。 – amit