lundi 30 mars 2015

SQLite Subquery Syntax Error when using Multiple Columns

It seems so simple; but I can't get this working.



select ISIN, QuoteTimestamp
from QuoteData
where (ISIN, QuoteTimestamp) IN
(select ISIN, MAX(QuoteTimestamp) QuoteTimestamp
from QuoteData
group by ISIN)


This query gives me a syntax error. If I amend it to only use a single column (remove the MAX(QuoteTimewstamp)) it works.


It seems to be correct, as per the documentation.


Thanks, Al.


Aucun commentaire:

Enregistrer un commentaire