Código SQL:
Ver originalCREATE TABLE #temp
(
fecha datetime,
divisa VARCHAR(20),
cotizacion INT
)
INSERT INTO #temp VALUES ('2013-28-02 00:00:00.000', 'USD', 1308404)
INSERT INTO #temp VALUES ('2013-31-01 00:00:00.000', 'USD', 1352393)
INSERT INTO #temp VALUES ('2012-31-12 00:00:00.000', 'USD', 1321807)
INSERT INTO #temp VALUES ('2012-30-11 00:00:00.000', 'USD', 1296664)
INSERT INTO #temp VALUES ('2012-31-10 00:00:00.000', 'USD', 1293678)
INSERT INTO #temp VALUES ('2012-30-09 00:00:00.000', 'USD', 1286041)
INSERT INTO #temp VALUES ('2012-31-08 00:00:00.000', 'USD', 1253196)
INSERT INTO #temp VALUES ('2007-15-11 00:00:00.000', 'CHF', 1623943)
INSERT INTO #temp VALUES ('2007-18-09 00:00:00.000', 'CHF', 1624439)
INSERT INTO #temp VALUES ('2000-01-01 00:00:00.000', 'CHF', 1423710)
INSERT INTO #temp VALUES ('2008-25-08 00:00:00.000', 'GBP', 0786543)
SELECT * FROM #temp WHERE fecha IN (SELECT MAX(fecha) FROM #temp GROUP BY divisa)