Hi,
I have 4 tables for each month; oct, dec, feb, apr. They have the same schema.
I need to extract the data from all the tables using the same query and grouping it for one attribute.
I know how to do it for one table but I would like to combine the results into one query and then dump the output into the file.
Here is my sample query:
select TIMESTAMPDIFF(hour,startTime,endTime) as duration, count(*) from feb
where type='gen' group by duration
into outfile "/feb";
Since I am grouping this for duration attribute, I end up 4 different output files and then merging and sorting the data explicitly is something I would like avoid.
Any help would be appreciated!
Omer