I have MySQL v. 3.23 The SUM function seems to be doubling one of my values when used in conjunction with another SUM function.
Here I show that I have only 95 in insFreq: mysql> select t2.andersonStart_pos, sum(t2.insFreq) from InsertionFreq t2 where t2.andersonStart_pos = 1072 group by t2.andersonStart_pos; +-------------------+-----------------+ | andersonStart_pos | sum(t2.insFreq) | +-------------------+-----------------+ | 1072 | 95 | +-------------------+-----------------+ Here I show I have 73 in delFreq: mysql> select t1.andersonStart_pos, sum(t1.delFreq) from DeletionFreq t1 where t1.andersonStart_pos = 1072 group by t1.andersonStart_pos; +-------------------+-----------------+ | andersonStart_pos | sum(t1.delFreq) | +-------------------+-----------------+ | 1072 | 73 | +-------------------+-----------------+ OK. Now notice that insFreq has DOUBLED when used in conjunction with with delFreq! mysql> select t1.andersonStart_pos, sum(t2.insFreq), sum(t1.delFreq) from InsertionFreq t2, DeletionFreq t1 where (t2.andersonStart_pos = 1072) and (t1.andersonStart_pos = 1072) group by t1.andersonStart_pos; +-------------------+-----------------+-----------------+ | andersonStart_pos | sum(t2.insFreq) | sum(t1.delFreq) | +-------------------+-----------------+-----------------+ | 1072 | 190 | 73 | +-------------------+-----------------+-----------------+ Is this a known bug? I couldn't find anything. Or is it just my SQL? Any help is much appreciated! Thanks Ari --------------------------------------------------------------------- Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php