1
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

prestoでJSTの期間指定をする雛形

Posted at

presto jstのクエリ

よく使うが忘れてしまうのでメモ

SELECT
  count(*) 
FROM db_name.table_name AS t
WHERE
    time BETWEEN 
      from_unixtime(to_unixtime(timestamp '2016-01-01 00:00 UTC' ) + (15 * 3600))
    AND
      from_unixtime(to_unixtime(timestamp '2016-01-02 00:00 UTC' ) + (15 * 3600))
;
1
2
2

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?