Could you clarify what you mean by "when every currency is closed". Looking at your table structure for "CurrencyClosed", it seems that you're already collecting the date/time that the currency closed. Are you referring to the date/time and time when the currency last closed? If so, a "MAX()" or "RANK() OVER" should get you what you need. If not, could you please give me some more explanation or sample of what you're needing.