Please, if you can , help me with this:
I have a table that contains the name of all the database's tables. each of this table is assigned a number id and a group: eg
id ( 54, 87, 85 , ...) , group ( 54, 3 , 3 , ...) , sections ( employees , materials, stations, ...)
the goal is to print the tables organized by group and to get: the group's average registers. eg ( materials has 50 register , sections has 0 register , average = 50 ) and the register total sum.
the final goal is to get, for example:
group ' 3 ' has '2' tables ' materials ' , ' stations' with an average of 50 and a total of registers of 50
the main problem I have here is that i don't know how to get a select count from-- for a random table in the main table group .
I hope I made myself clear. Thanks in advance