Answer the question
In order to leave comments, you need to log in
How to get nHibernate, composite-id and INNER JOIN/WHERE IN together?
There is such a TSQL
SELECT Data.*
FROM [currrates_data].[dbo].[CashExchangeRates] Data
INNER JOIN (
SELECT
[FinancialInstitutionCountryCode],
[FinancialInstitutionName],
[BaseCurrency],
[QuoteCurrency],
MAX([Timestamp]) AS [Timestamp]
FROM [currrates_data].[dbo].[CashExchangeRates]
GROUP BY
[FinancialInstitutionCountryCode]
[FinancialInstitutionName]
[BaseCurrency]
[QuoteCurrency]) Filter
ON
[Data].[FinancialInstitutionCountryCode] = [Filter].[FinancialInstitutionCountryCode] AND
[Data].[FinancialInstitutionName] = [Filter].[FinancialInstitutionName] AND
[Data].[BaseCurrency] = [Filter].[BaseCurrency] AND
[Data].[QuoteCurrency] = [Filter].[QuoteCurrency] AND
[Data].[Timestamp] = [Filter].[Timestamp]
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question