Created
January 25, 2017 13:54
-
-
Save zettamax/d1a9ed3dde3092c515b2ba19c6232a91 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#schema | |
create table `first` ( | |
`market_id` int unsigned NOT NULL, | |
`date` datetime NOT NULL, | |
`value` double NOT NULL | |
); | |
#query | |
select `market_id`, min(`value`) as `min_value` | |
from `first` | |
where `date` between '2017-01-03 00:00:00' and '2017-01-04 00:00:00' | |
group by `market_id`; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment