SELECT
userName,
CONCAT(sum(
CASE
WHEN DATE_FORMAT(createTime, '%Y-%m-%d') BETWEEN '2017-07-31'
AND '2017-08-30' THEN
assign
ELSE
0
END
,
'/',
sum(
CASE
WHEN DATE_FORMAT(createTime, '%Y-%m-%d') BETWEEN '2017-07-31'
AND '2017-08-30' THEN
beassign
ELSE
0
END
))
AS shier
from t_task
//利用CONVERT 函数 转为 utf8 格式
select CONVERT(column using utf8)from table
SELECT
userName,
CONVERT(
CONCAT(sum(
CASE
WHEN DATE_FORMAT(createTime, '%Y-%m-%d') BETWEEN '2017-07-31'
AND '2017-08-30' THEN
assign
ELSE
0
END
,
'/',
sum(
CASE
WHEN DATE_FORMAT(createTime, '%Y-%m-%d') BETWEEN '2017-07-31'
AND '2017-08-30' THEN
beassign
ELSE
0
END
)) USING utf8)
AS shier
from t_task
SELECT userName, CONCAT(sum( CASE WHEN DATE_FORMAT(createTime, '%Y-%m-%d') BETWEEN '2017-07-31' AND '2017-08-30' THEN assign ELSE 0 END , '/', sum( CASE WHEN DATE_