Skip to content

Instantly share code, notes, and snippets.

@thomsbg
Created October 29, 2013 15:15
Show Gist options
  • Save thomsbg/7216562 to your computer and use it in GitHub Desktop.
Save thomsbg/7216562 to your computer and use it in GitHub Desktop.
(
select transactions.*, exchange_rate.rate
join exchange_rate on transcations.month = exchange_rate.month
)
union
(
select predictions.*, (select rate from exchange_rate order by month desc limit 1) as rate
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment