diff --git a/lib/day.rb b/lib/day.rb index aa8de00..ca28b6d 100644 --- a/lib/day.rb +++ b/lib/day.rb @@ -17,6 +17,7 @@ class Day < Sequel::Model Sequel.lit('rates.key').as(:iso_code), Sequel.lit('rates.value::text::float').as(:rate)) .join(Sequel.function(:jsonb_each, :rates).lateral.as(:rates), true) + .order(Sequel.asc(:date), Sequel.asc(:iso_code)) end end end