我目前正在尝试清理前员工创建的邮件订阅者数据库。我已经能够整合和修复大多数问题(主要是重复的),但我有订阅者的实例,因为他们订阅了多个区域。我想要做的是将这些重复记录合并为1.
以下是我想要合并的重复记录的编辑实例:
id first last address truck machinery gl ne nw
------------------------------------------------------------------------
1 Chuck G.... 12 Lorem 1 1
2 Chuck G.... 12 Lorem 1 1
3 Chuck G.... 12 Lorem 1 1
我想将2合1记录合并,并删除所有副本(有些重复最多9个),如下所示:
id first last address truck machinery gl ne nw
------------------------------------------------------------------------
1 Chuck G.... 12 Lorem 1 1 1 1 1
答案 0 :(得分:5)
使用{
"countries": [
{
"code": "AD",
"name": "Andorra",
"population": "84000"
},
{
"code": "AE",
"name": "United Arab Emirates",
"population": "4975593"
}
]
}
和Group By
汇总
Max/Min