SELECT `tbl_main_currency_best`.`date`, MAX(tbl_main_currency_best.maxbuy) AS `maxbuy`, MIN(tbl_main_currency_best.minsell) AS `minsell`, `tbl_main_currency_best`.`currency_id` FROM `tbl_main_currency_best` WHERE (`tbl_main_currency_best`.`city_id`=4084) AND (`tbl_main_currency_best`.`date`=1490216400) GROUP BY `tbl_main_currency_best`.`currency_id` ORDER BY `tbl_main_currency_best`.`currency_id`