php - I want to make a sum from 5 tables that have one column named "UP" -


i have 5 tables (bepd , tirpd , elpd , frpd , kopd) same column named "up" , , want make sum of tables , show in php code . can me ?

select  sum(sumup)    (         select  sum(up) sumup            table1          union         select  sum(up)            table2         union         select  sum(up)            table3         union         ...         ) subqueryalias 

Comments

Popular posts from this blog

c++ - Function signature as a function template parameter -

algorithm - What are some ways to combine a number of (potentially incompatible) sorted sub-sets of a total set into a (partial) ordering of the total set? -

How to call a javascript function after the page loads with a chrome extension? -