| | |
| | | <result column="departmentid" property="departmentid"/> |
| | | <result column="stats" property="stats"/> |
| | | <result column="jurisdiction" property="jurisdiction"/> |
| | | <result column="representativecell" property="representativecell"/> |
| | | <result column="contacts" property="contacts"/> |
| | | <result column="contactscell" property="contactscell"/> |
| | | </resultMap> |
| | | |
| | | |
| | |
| | | IFNULL(A.amount, 0) AS lastamount, |
| | | IFNULL(B.amount, 0) AS thisamount |
| | | FROM ( |
| | | SELECT COUNTb. |
| | | (*) AS lastmonth, |
| | | SELECT COUNT(*) AS lastmonth, |
| | | amount, |
| | | deptid |
| | | FROM |
| | |
| | | deptid |
| | | ) A |
| | | left JOIN ( |
| | | SELECT COUNT |
| | | (*) AS thismouth, |
| | | SELECT COUNT(*) AS thismouth, |
| | | amount, |
| | | deptid |
| | | FROM |