aboutsummaryrefslogtreecommitdiffstats
path: root/sql/dawn.sql
diff options
context:
space:
mode:
Diffstat (limited to 'sql/dawn.sql')
-rw-r--r--sql/dawn.sql2
1 files changed, 1 insertions, 1 deletions
diff --git a/sql/dawn.sql b/sql/dawn.sql
index 507772a0..74fef12e 100644
--- a/sql/dawn.sql
+++ b/sql/dawn.sql
@@ -328,7 +328,7 @@ $$ LANGUAGE plpgsql;
CREATE OR REPLACE function fx_rate(p_date date) RETURNS TABLE(currency currency, fxrate float) AS $$
BEGIN
RETURN QUERY SELECT unnest(Array['USD', 'EUR', 'CAD'])::currency,
- unnest(Array[1, eurusd, cadusd]) FROM fx WHERE date<=p_date ORDER by date LIMIT 3;
+ unnest(Array[1, eurusd, cadusd]) FROM fx WHERE date<=p_date ORDER by date desc LIMIT 3;
END;
$$ LANGUAGE plpgsql;