$rs = $db->query('select shop, ym, sum(fd), sum(pk), sum(bt), sum(kd) from table group by shop, ym');
Build an function ( sth. like: echo pivot( $rs, $y, $x) ) to pivotize the result-set into an html-Table
20/01 20/02 20/03 ....
if you want an extra, add sum / average / percentage ...
Notice: Next step will be db-Based class-Modell of App-Services
12 freelancers are bidding on average €405 for this job
Hello, i am full stack developer , i can help you in your php- mysql work i can do this function to pivotize your data please send me full details on chat Regards, Ahmed Sobhy Regards, Ahmed Sobhy