Sebastian Bergmann has figured out half of the puzzle he was working on but is still a bit stuck on the second half. He knows how to mine information from Subversion, but not they queries to ask the database for the info he needs.
I have written a small PHP script (the initial version of the script can be found here) to import the relevant data from a Subversion repository into the following tables of a relational database. [...] What I need now is two queries to ask the database
There's already been tons of comments in an effort to help him out, but it doesn't look quite like he's resolved the issue just yet.
UPDATE 12.06.207: Seems he's found a solution that'll work for him - here's the script.