1.FROM_UNIXTIME 将时间戳转换为Date类型
示例:
SELECT
ji.id,
ji.publish_time,
FROM_UNIXTIME(ji.publish_time/1000 ) AS publish_date
FROM
job_info ji
查询结果:
还有 UNIX_TIMESTAMP 是将Date类型转换为Long类型,用法相同
2.group_concat 将分组结果放在一起
示例:
SELECT
industry,
group_concat(WORK)
FROM
work_type
WHERE
industry = "人事/行政/后勤"
GROUP BY
industry
查询结果: