Is there a way to access log from appdaemon for SQL SELECT?

Is there a way to access the states & events log directly from appdaemon.
I wish to see how long ago a particular state changed, but only need to do this once a day, so didn’t want to create individual platform: sql sensor components.
Is there a connection for appdaemon to read the log?
I have looked and cannot see anything - happy to add an example to the tutorials if there is a way - I had hoped sqlalchemy or similar, and can get teh connection string, or ideally a connection that is ready-made that I can use.
Thanks