• sql 查出相同的记录 并把相同记录 显示在一起


    select c.workunit unitname,a.positionid,a.positiontype,a.isfirst,a.mastersort,a.directoraudit, c.writername,d.bookname,e.orgname unitid,b.positiontype applypositiontype, b.auditstate,b.editauditstate,b.appposiid,c.writerid,d.bookid,b.materid,b.isreceivedpaper, case when a.positiontype='' or a.positiontype is null then 1 else 0 end sort from teach_positionset a right join teach_applyposition b on b.appposiid = a.appposiid left join writer_declaration c on c.writerid=b.writerid left join teach_bookinfo d on d.bookid=b.bookid left join ba_organize e on e.orgid=c.unitid where 1=1 and b.auditstate=11 and b.isreceivedpaper=1 and d.bookid="1815f93a80da4427853a1a2a9faf06e2"
    AND b.positiontype in(SELECT b.positiontype applypositiontype FROM teach_applyposition b group by b.positiontype having count(b.positiontype)>1) GROUP BY appposiid ORDER BY sort,a.positiontype,a.mastersort,b.positiontype

    SELECT b.positiontype applypositiontype FROM teach_applyposition b group by b.positiontype having count(b.positiontype)>1的结果是

  • 相关阅读:
    jenkins代码自动部署
    jenkins安装
    git图形管理工具
    gitlab自动备份恢复与卸载
    linux下获取外网IP
    网站安全webshell扫描
    jQuery动画效果实现
    form表单中的enctype属性什么意思?
    你那么努力又怎么样!
    话语
  • 原文地址:https://www.cnblogs.com/niuxi/p/7244029.html
Copyright © 2020-2023  润新知