| | |
| | | SELECT IFNULL(A.thisnum, 0) AS thisnum, |
| | | IFNULL(B.lastnum, 0) AS lastnum, |
| | | IFNULL( C.num, 0 ) AS num, |
| | | IFNULL( C.fznum, 0 ) AS fznum, |
| | | H.departmentid, |
| | | H.jurisdiction |
| | | FROM (SELECT departmentid, jurisdiction FROM sys_information GROUP BY departmentid, jurisdiction) H |
| | | FROM (SELECT departmentid, jurisdiction FROM sys_information WHERE stats!=1 GROUP BY departmentid, jurisdiction) H |
| | | LEFT JOIN ( |
| | | SELECT COUNT(*) AS thisnum, |
| | | dept_id |
| | |
| | | ) B ON B.dept_id = H.departmentid |
| | | LEFT JOIN ( |
| | | SELECT |
| | | J.fznum, |
| | | J.znum+J.fznum as num, |
| | | J.dept_id |
| | | FROM |