SELECT sum(col1) AS total1 FROM t1 GROUP by col1 SELECT col1, sum(col2) AS total2 FROM t2 GROUP by col2 Table t1 contains 4 rows to sum for each value in col1 Table t2 contains 8 rows to sum for each value in col2 If one select statement is used, the result has 8 rows and total2 is correct but the tota11 is summed over 8 rows instead of 4 How can they be joined to produce one row total1, total2
- Re: Sum() unequal number of rows Dave Kennedy
- Re: Sum() unequal number of rows SGreen
- Re: Sum() unequal number of rows Eric Bergen
- Re: Sum() unequal number of rows Ian Sales (DBA)