I'd like to select all entries from a table where date is the last one and only those ones.
For example: today is May 16th, the last entries I have from my table is dated from May 15th, but I have older ones (May 14th, May13th, etc). I'd like to select only the dated from May 15th, but it's not this specific date, I need to select every entry dated from the last date I have in my database.
开发者_如何学PythonHow to?
Thx in advance
SELECT [list]
FROM MyTable MT1
WHERE MT1.date = (
SELECT MAX(MT2.date)
FROM MyTable MT2
)
精彩评论