Hi,
Thank you for the post.
You may create your own queries for SQL to get you want. here is no specific documentation on TMG to do that since it is a more a SQL type of procedure. Here are the fields that are logged on the SQL database:
Web Proxy Log fields:
http://technet.microsoft.com/en-us/library/cc441708.aspx
Firewall Log Fields:
http://technet.microsoft.com/en-us/library/cc441692.aspx
Regards,
Nick Gu - MSFT