每天学习一点点 编程PDF电子书免费下载: http://www.shitanlife.com/code

 

cast(starttime as date):  时间转日期类型

 

实例SQL:


SELECT
COUNT (ID) AS pvNum,
COUNT (DISTINCT userid) AS userNum,
cast(starttime as date) AS staDay
FROM
t_e_visit_record
WHERE true
AND starttime >= '2018-03-20'
GROUP BY
cast(starttime as date)

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-11-23
  • 2022-12-23
  • 2022-12-23
  • 2022-03-08
  • 2021-11-26
  • 2021-07-16
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-01-29
  • 2021-04-26
  • 2021-06-16
  • 2021-12-22
相关资源
相似解决方案