mysql数据集查询

表A,受理时间(s)一年内的重复致电(tel)3次以上的数量怎么查

FineReport 用户EzRPN4213 发布于 2020-7-2 16:15 (编辑于 2020-7-2 16:23)
1min目标场景问卷 立即参与
回答问题
悬赏:3 F币 + 添加悬赏
提示:增加悬赏、完善问题、追问等操作,可使您的问题被置顶,并向所有关注者发送通知
共3回答
最佳回答
0
zsh331Lv8专家互助
发布于2020-7-2 16:28
select date_format(s,"%Y"),tel,count(1) from a group by date_format(s,"%Y"),tel having count(1)>3


按照这个思路去写。

最佳回答
0
就TM你叫夏洛啊Lv6中级互助
发布于2020-7-2 16:29(编辑于 2020-7-2 16:30)
select tel from(select count(s)num,tel from A group by tel)a where num > 3


最佳回答
0
huyajunLv6初级互助
发布于2020-7-2 16:29

select  * from ()select  count(distinct tel) as  a,tel  from   A where  s>='2020-01-01' )where a>=3

  • 4关注人数
  • 285浏览人数
  • 最后回答于:2020-7-2 16:30
    请选择关闭问题的原因
    确定 取消
    返回顶部