you didn't say that (svr,started,ended,volume,who) is a unique key... If not, it would explain the result and the extra rows you get.
Well... that combination of fields *should* be unique. Does a unique index need to be specified on those columns? It is possible that (svr,started,ended,volume,who) may not be unique, and that duplicate data was inserted into the table.
I was assuming that my beginning SQL skills were to blame for the unexpected results. If I understand your comment correctly, if the combination of columns shown above is indeed a unique key, then the results of my query should have been what I expected. Please correct me if that is not the case.
Sorry, I wasn't clear. When you do your query : select count(*) from x.table_a,y.table_b WHERE x.table_a.svr = y.table_b.svr and x.table_a.started = y.table_b.started and x.table_a.ended = y.table_b.ended and x.table_a.volume = y.table_b.volume and x.table_a.who = y.table_b.who;
I understand that you expect the combination of (svr,started,ended,volume,who) be unique accross all rows.
To my opinion, that's not the case. Try remove duplicate entry, with the help of previous post here.
-- Philippe Poelvoorde COS Trading Ltd.
-- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]