SQLite export of user activity stats

Requested by Neil Bowers.