Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- SELECT
- TD_TIME_FORMAT(time,'yyyy-MM-dd HH:mm:ss','JST') AS t,
- TD_DATE_TRUNC('minute', time, 'JST' ) AS mnt,
- TD_DATE_TRUNC('hour', time, 'JST' ) AS h,
- TD_DATE_TRUNC('day', time, 'JST' ) AS d,
- TD_DATE_TRUNC('week', time, 'JST' ) AS w,
- TD_DATE_TRUNC('month', time, 'JST' ) AS m,
- TD_DATE_TRUNC('quarter', time, 'JST' ) AS q,
- TD_DATE_TRUNC('year', time, 'JST' ) AS y
- FROM access_log
- WHERE TD_TIME_RANGE(time,'2017-01-15','2017-01-16','JST')
- ORDER BY t DESC
- LIMIT 1
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement