如何把MYSQL多条数据整理合并成一条
WorkDate uid WeaponID kill death 201111012 4 1 2 3 WorkDate uid WeaponID kill death 201111012 4 1 1 2 把这2条数据合并 并把kill和death它们加起来 等于 WorkDate uid WeaponID kill death 201111012 4 1 3 5 要怎么写 属于后期整理优化的
追问:你QQ多少我加你吧
WorkDate uid WeaponID kill death 201111012 4 1 2 3 WorkDate uid WeaponID kill death 201111012 4 1 1 2 把这2条数据合并 并把kill和death它们加起来 等于 WorkDate uid WeaponID kill death 201111012 4 1 3 5 要怎么写 属于后期整理优化的
追问:你QQ多少我加你吧
答案:select WorkDate, uid, WeaponID, sum(kill), sum(death)
from tab
group by WorkDate, uid, WeaponID
其他:合并要有一定的条件吧?
具体是什么条件啊?