I have a database with several tables. Each of them (named after a user) contain a list of events with a time length. I can access each table individually and compute all the information I need.
I have been trying to query all the tables together (for instance to get average length of events among all the users), but it seems that the JOIN function works with two tables. I have many of them. Any ideas?
Each tale has the same structure - one event per row (here is a simplified description):
id | start time | end time | description of event | tag
What I need to do is to get the average length of the same type of event (events with the same tag) on a number of tables (each table includes events of a specific user, and new users can register and add their events)