This has a couple techniques for dealing with that kind of situation. I don't know if it will work for your exact situation, but it might be worth a shot. http://dev.mysql.com/doc/refman/5.0/en/example-maximum-column-group-row.html Orson