I think I can help with question B. Just had a course last semester (Systems Programming) which we had to write four papers on four different topics (NTP, DNS, Directory Services, and Filesystems) in ACM format (bleh). With each of the papers we were required to have two scripts written in...
I created a MySQL table using mikeblas' create table and insert SQL queries. on a database server that is MySQL v.5.1.24 and tested Sgraffite's SQL query from post #2. The output is what is specified under the goal in the original post.
Note: pid = personid and times = time