SELECT
FROM_UNIXTIME(add_time, '%Y-%m-%d') AS date,
sum(price),
user_id
FROM
`ryc_order_course`
WHERE
add_time != ''
GROUP BY
date,
user_id
SELECT
FROM_UNIXTIME(add_time, '%Y-%m-%d') AS date,
sum(price),
user_id
FROM
`ryc_order_course`
WHERE
add_time != ''
GROUP BY
date,
user_id
转载于:https://www.cnblogs.com/guolc/p/9934557.html