I just had a look at the event related code (I'm not familiar with it).
The query is run by the scheduler in order to resend unsuccessful events. Do you have a mail server configured in your lams configuration? If not, one possibility is that mail notifications build up in the events tables.
In any case, can you do a dump of your lams_events and lams_event_subscriptions tables and attach/send them? Using mysqldump:
mysqldump lams lams_events lams_event_subscriptions > C:\dump.sql -u root -p
where the first argument is the database name.
Posted by Jun-Dir Liew