sql - SUM of attributes across different ables and JOIN -
I am currently learning SQL and have the following problems.
Suppose I have two very large tables,
table one name CNT A1B2 table B. name CNT A2C5 Now I want to join two tables and add CNT. The name is same
Results Name CNT A3B2C5 Can anybody help to provide some hints on a good way to go? << P>
select NAME, from SUM (CNT) (select NAME, from CNT to TABLE_A UNION Select all names, CNT to TABLE_B ) TAB Group by NAME;
Comments
Post a Comment