I'm working on a plugin that required getting the earliest date in the database, and also getting the oldest date in the database. I was hoping that there was a built-in function that did this – and there is.
I found this helpful article on various mySQL techniques. And this is the one I was going to use:
MIN() will return the earliest date, while MAX() returns the latest date.
So the mySQL statement will look something like this: