我有我保持一个表保存职位comment_type,我要选择具有重复发表评论型职位数量等MySQL的计数不同的查询
PostExtras
- id
- amount
- post_id (foreign key)
- comment_type (foreign key)
- ...
comment_type
- id
- name
。
实施例:
- id - amount - post_id - comment_type
1 20 23 1
2 45 23 2
3 80 28 1
4 78 28 2
5 56 23 1
行1和5实际上是相同的。
复制在什么基础? –
所以,你的意思是相反的不同? –
我的意思是有两个或更多相同的comment_type的职位。 – gandil