我正在尝试将以下内容分组:
CLAIM # LINE SEQ AMNT BILLED AMOUNT ALLOWED AMOUNT PAID COPAY
LA123456 1 20 18 15 3
LA123456 2 10 5 5 0
LA123456 3 50 30 30 0
MS123456 1 20 18 15 3
MS123456 2 10 5 5 0
MS123456 3 50 30 30 0
我希望看到这样的事情:
CLAIM # AMOUNT BILLED AMOUNT ALLOWED AMOUNT PAID COPAY
LA123456 80 53 50 3
MS123456 80 53 50 3
有关如何做的任何建议吗?
答案 0 :(得分:0)
//The syntax is select sum(field1),sum(field2)from table_name group by field3
select sum(AMNT BILLED),sum(AMOUNT ALLOWED),sum(AMOUNT PAID),sum(COPAY) from table_name group by CLAIM
这是非常基本的
请参阅以下内容以供参考