SELECT
typ.user_conversion_type "Conversion Type"
, rat.from_currency "From Currency"
, rat.to_currency "To Currency"
, MIN(conversion_date) "Earliest Date"
, MAX(conversion_date) "Latest Date"
FROM gl_daily_conversion_types typ
, gl_daily_rates rat
WHERE rat.conversion_type = typ.conversion_type
AND rat.from_currency < rat.to_currency -- Ensure pairs only
shown once.
GROUP BY
typ.user_conversion_type
, rat.from_currency
, rat.to_currency
ORDER BY 1,2,3
No comments:
Post a Comment