56,678
社区成员
发帖
与我相关
我的任务
分享
SELECT count(1) from t_user_quanrl where qid = 16 and roles > 5
union all(select count(1) from `sys_user` a inner join(select userid from t_user_quanrl where qid = 16 and roles > 5 ) b on a.`userid` = b.`userid` and (DATE(NOW()) = DATE(a.regdate)))
union all(select count(1) from `sys_user` a inner join(select userid from t_user_quanrl where qid = 16 and roles > 5 ) b on a.`userid` = b.`userid` and a.ugender = 1)
union all(select count(1) from `sys_user` a inner join(select userid from t_user_quanrl where qid = 16 and roles > 5 ) b on a.`userid` = b.`userid` and a.ugender = 2)
union all(select count(1) from `t_user_loginhis` a inner join(select userid from t_user_quanrl where qid = 16 and roles > 5 ) b on a.`uid` = b.`userid` and(DATE(NOW()) = DATE(a.vdate)))
union all(SELECT count(1) from `t_user_clinc` a where (datediff(NOW(), clincdate) = 0) and a.bclsid = 16)
union all(select count(1) from `t_user_mentalhis` a inner join(select userid from t_user_quanrl where qid = 16 and roles > 5 ) b on a.`muid` = b.`userid` and(DATE(NOW()) = DATE(a.mdate)))
union all(select count(1) from `t_user_mentalhis` a inner join tmp_ql b on a.`muid` = b.`userid` ) union all(select count(1) from `t_user_iot_examdx` a inner join(select userid from t_user_quanrl where qid = 16 and roles > 5 ) b on a.`userid` = b.`userid` and(DATE(NOW()) = DATE(a.cdate)))
union all(select count(1) from tmp_mhis a inner join tmp_ql1 b on a.`muid` = b.`userid` ) union all(select count(1) from `sys_user` a inner join(select userid from t_user_quanrl where qid = 16 and roles > 5 ) b on a.`userid` = b.`userid` and year(regdate) = year(curdate()) and (month(regdate) = month(curdate())))
union all(select count(1) from `sys_user` a inner join(select userid from t_user_quanrl where qid = 16 and roles > 5 ) b on a.`userid` = b.`userid` and year(regdate) = year(curdate()) and month(regdate) = month(curdate()) and (week(regdate) = week(curdate())))
union all ( select sum(ubalance-5) from `t_user_account` a inner join (select userid from t_user_quanrl where qid = 16 and roles > 5 ) b on a.`userid` = b.`userid` )
union all(select sum(realpayfee) from `t_user_paybill` a inner join(select userid from t_user_quanrl where qid = 16 and roles > 5 ) b on a.`uid` = b.`userid` and (DATE(NOW()) = DATE(a.buydate)) )
union all(select sum(realpayfee) from `t_user_paybill` a inner join(select userid from t_user_quanrl where qid = 16 and roles > 5 ) b on a.`uid` = b.`userid` and year(buydate) = year(curdate()) and ( month(buydate) = month(curdate()) ) )
union all(select sum(transfee) from `t_user_payment_bill` a inner join(select userid from t_user_quanrl where qid = 16 and roles > 5 ) b on a.`userid` = b.`userid` and payflag = 0 and(DATE(NOW()) = DATE(a.ucdate)))
union all(select sum(transfee) from `t_user_payment_bill` a inner join(select userid from t_user_quanrl where qid = 16 and roles > 5 ) b on a.`userid` = b.`userid` and payflag = 0 and year(ucdate) = year(curdate()) and(month(ucdate) = month(curdate())))
union all(select sum(transfee) from `t_user_payment_bill` a inner join(select userid from t_user_quanrl where qid = 16 and roles > 5 ) b on a.`userid` = b.`userid` and payflag = 1 and year(ucdate) = year(curdate()) and (month(ucdate) = month(curdate())))
union all(select count(1) from `sys_user_hext` a inner join(select userid from t_user_quanrl where qid = 16 and roles > 5 ) b on a.`userid` = b.`userid` and isbp = 1 )
union all(select count(1) from `sys_user_hext` a inner join(select userid from t_user_quanrl where qid = 16 and roles > 5 ) b on a.`userid` = b.`userid` and islip = 1 )
union all(select count(1) from `sys_user_hext` a inner join(select userid from t_user_quanrl where qid = 16 and roles > 5 ) b on a.`userid` = b.`userid` and isDiabet = 1 )
union all(select count(1) from `t_user_iot_ecgx` a inner join(select userid from t_user_quanrl where qid = 16 and roles > 5 ) b on a.`userid` = b.`userid` and ECGRESULT like '%异常%' )
union all(select count(1) from `t_user_mentalhis` a inner join(select userid from t_user_quanrl where qid = 16 and roles > 5 ) b on a.`muid` = b.`userid` and `vwarnlevel` = 3 and year(mdate) = year(curdate()) and ( month(mdate) = month(curdate()) ) )
union all(select count(1) from `t_user_mentalhis` a inner join(select userid from t_user_quanrl where qid = 16 and roles > 5 ) b on a.`muid` = b.`userid` and `vwarnlevel` = 3 and year(mdate) = year(curdate()) and ( month(mdate) = month('2020-08-26') ) )
union all(select count(1) from `t_user_mentalhis` a inner join(select userid from t_user_quanrl where qid = 16 and roles > 5 ) b on a.`muid` = b.`userid` and `vwarnlevel` = 3 and year(mdate) = year(curdate()) and ( month(mdate) = month('2020-07-26') ) )
union all(select count(1) from `t_user_mentalhis` a inner join(select userid from t_user_quanrl where qid = 16 and roles > 5 ) b on a.`muid` = b.`userid` and `vwarnlevel` = 4 and year(mdate) = year(curdate()) and ( month(mdate) = month(curdate()) ) )
union all(select count(1) from `t_user_mentalhis` a inner join(select userid from t_user_quanrl where qid = 16 and roles > 5 ) b on a.`muid` = b.`userid` and `vwarnlevel` = 4 and year(mdate) = year(curdate()) and ( month(mdate) = month('2020-08-26') ) )
union all(select count(1) from `t_user_mentalhis` a inner join(select userid from t_user_quanrl where qid = 16 and roles > 5 ) b on a.`muid` = b.`userid` and `vwarnlevel` = 4 and year(mdate) = year(curdate()) and ( month(mdate) = month('2020-07-26') ) )
union all(select count(1) from `t_user_mentalhis` a inner join(select userid from t_user_quanrl where qid = 16 and roles > 5 ) b on a.`muid` = b.`userid` and `vwarnlevel` = 5 and year(mdate) = year(curdate()) and ( month(mdate) = month(curdate()) ) )
union all(select count(1) from `t_user_mentalhis` a inner join(select userid from t_user_quanrl where qid = 16 and roles > 5 ) b on a.`muid` = b.`userid` and `vwarnlevel` = 5 and year(mdate) = year(curdate()) and ( month(mdate) = month('2020-08-26') ) )
union all(select count(1) from `t_user_mentalhis` a inner join(select userid from t_user_quanrl where qid = 16 and roles > 5 ) b on a.`muid` = b.`userid` and `vwarnlevel` = 5 and year(mdate) = year(curdate()) and ( month(mdate) = month('2020-07-26') ) )
union all(select count(1) from `sys_hservice_hypertension` a inner join(select userid from t_user_quanrl where qid = 16 and roles > 5 ) b on a.`ARCHIVEID` = b.`userid` and year(created_date) = year(curdate()) )
union all(select count(1) from `sys_hservice_hypertension` a inner join(select userid from t_user_quanrl where qid = 16 and roles > 5 ) b on a.`ARCHIVEID` = b.`userid` and year(created_date) = year(curdate()) and (month(created_date) = month(curdate())) )
union all(select count(1) from `sys_hservice_diabetes` a inner join(select userid from t_user_quanrl where qid = 16 and roles > 5 ) b on a.`archiveid` = b.`userid` and year(created_date) = year(curdate()) )
union all(select count(1) from `sys_hservice_diabetes` a inner join(select userid from t_user_quanrl where qid = 16 and roles > 5 ) b on a.`archiveid` = b.`userid` and year(created_date) = year(curdate()) and (month(created_date) = month(curdate())) )
union all(select count(1) from `sys_hservice_tuber_sf` a inner join(select userid from t_user_quanrl where qid = 16 and roles > 5 ) b on a.`archiveid` = b.`userid` and year(created_date) = year(curdate()) )
union all(select count(1) from `sys_hservice_tuber_sf` a inner join(select userid from t_user_quanrl where qid = 16 and roles > 5 ) b on a.`archiveid` = b.`userid` and year(created_date) = year(curdate()) and (month(created_date) = month(curdate())) )
union all(select count(1) from `sys_hservice_pregnant25` a inner join(select userid from t_user_quanrl where qid = 16 and roles > 5 ) b on a.`ARCHIVEID` = b.`userid` and year(created_date) = year(curdate()) )
union all(select count(1) from `sys_hservice_pregnant25` a inner join(select userid from t_user_quanrl where qid = 16 and roles > 5 ) b on a.`ARCHIVEID` = b.`userid` and year(created_date) = year(curdate()) and (month(created_date) = month(curdate())) )
union all(select count(1) from `sys_hservice_pregnant_born` a inner join(select userid from t_user_quanrl where qid = 16 and roles > 5 ) b on a.`ARCHIVEID` = b.`userid` and year(created_date) = year(curdate()) )
union all(select count(1) from `sys_hservice_pregnant_born` a inner join(select userid from t_user_quanrl where qid = 16 and roles > 5 ) b on a.`ARCHIVEID` = b.`userid` and year(created_date) = year(curdate()) and (month(created_date) = month(curdate())) )
union all(select count(1) from `sys_hservice_pregnant_b42` a inner join(select userid from t_user_quanrl where qid = 16 and roles > 5 ) b on a.`ARCHIVEID` = b.`userid` and year(created_date) = year(curdate()) )
union all(select count(1) from `sys_hservice_pregnant_b42` a inner join(select userid from t_user_quanrl where qid = 16 and roles > 5 ) b on a.`ARCHIVEID` = b.`userid` and year(created_date) = year(curdate()) and (month(created_date) = month(curdate())) )
union all(select count(1) from `sys_hservice_babyfollow` a inner join(select userid from t_user_quanrl where qid = 16 and roles > 5 ) b on a.`archiveid` = b.`userid` and year(created_date) = year(curdate()) )
union all(select count(1) from `sys_hservice_babyfollow` a inner join(select userid from t_user_quanrl where qid = 16 and roles > 5 ) b on a.`archiveid` = b.`userid` and year(created_date) = year(curdate()) and (month(created_date) = month(curdate())) )
union all(select count(1) from `sys_hservice_healthinfo` a inner join(select userid from t_user_quanrl where qid = 16 and roles > 5 ) b on a.`archiveid` = b.`userid` and year(created_date) = year(curdate()) )
你好,我目前也遇到了,相似的问题,能不问下您以前的解决方案嘛