Skip to content

Instantly share code, notes, and snippets.

@itkr
Created August 18, 2014 06:38
Show Gist options
  • Save itkr/679400d6be00cbf72bff to your computer and use it in GitHub Desktop.
Save itkr/679400d6be00cbf72bff to your computer and use it in GitHub Desktop.
日本時間を考慮して過去三日分のデータを取得する
select
id,
updated_at
from
foo_table
where
date(updated_at + interval 9 hour) between (current_date() - interval 3 day) and (current_date() - interval 1 day)
;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment