If you go to the
Processing libraries reference and search for SQL, you'll find some libraries intended to make this easier. Most libraries include sample code which you should peruse.
The page for SQLibrary, which you'll find on that page, includes some sample code, and the third example, entitled "MySQL_Timestamp" is pretty close to what you're looking for (it's accessing data in the draw function, which gets you most of the way there).
Enjoy!
For what it's worth, I think the random() function is way more fun than column 1.