报表设计,领导说给他10分钟能做完,给我要一个月。我不信。专家在哪里,帮我看看,85606
85607
数据出不来,求大神帮忙。SELECT
a.podate,
MID(A.PODATE, 6, 2) AS m,
b.regionalname,
a.dq,
CASE c.customerName
WHEN '公共基金客户' THEN
'公共基金'
WHEN '异常公司费用结算客户' THEN
'公司'
WHEN '异常个人费用结算客户' THEN
'个人和团队'
WHEN '异常团队费用结算客户' THEN
'个人和团队'
ELSE
''
END AS customerName,
c.outtype,
b.provincename,
b.name,
a.value
FROM
copy_of_t_center_staffersailbak a
LEFT OUTER JOIN t_center_bankbu_level b ON a.staffer = b.name
LEFT OUTER JOIN t_center_out c ON a.id = c.id
WHERE
a.podate BETWEEN '${开始时间}' AND '${结束时间}'
AND c.customerName IN (
'公共基金客户',
'异常公司费用结算客户',
'异常个人费用结算客户',
'异常团队费用结算客户'
)
ORDER BY SUBSTRING(A.PODATE, 6, 2)