Connecting to multiple banks with mysql loop

0

Good afternoon

My question is about connecting to several databases in mysql for reporting

I would like the annual result of the year 2016 in sales, with this I want to get the result of each month, but this would require a select for each month and for each bank, right? for example: January 01 branch sold a total of 1000.00 subsidiary 01 February sold a total of 1000.00 until December and then do at branch 02 and branch 03 this all month by month ...

Is there any way to make a reduced code? I want to make a View for this .. but the logic of the code for me is not very clear.

    
asked by anonymous 09.08.2017 / 19:09

0 answers