Get most recent replies/posts/topics of forum...

Ok so I was told by the pre sales guy that I would be able to get the most recent posts from a forum using a SQL query. I have been trying to figure it out but to no avail. I was hopeing someone will be able to point me in the right direction.

Thanks

Josh