SQL Puzzle

Dear lazyweb,

I want to mine a code repository for data to map past bugs to sourcecode files.

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:

bugs            changes         paths
--------        --------        -------
bug_id          path_id   <-->  path_id
revision  <-->  revision        path
What I need now is two queries to ask the database for
  • paths that are most commonly changed during bugfix commits and
  • paths that are commonly changed together
Your suggestions are most welcome in the comments to this posting :-)