Maybe my SQL's a little rusty, but isn't a left (outer) join between voters+precincts and (that)+party going to create a massive table with a bunch of nulls inserted? (And, how do you know they're primary keys, and that any of it is indexed? That's not evident from the query)
Maybe "worst I've ever seen" is hyperbolic. My main point was, it's a sloppy query, could probably be done with a few WHERE clauses and an inner join instead, and is more evidence of shoddy coding practices.
Maybe "worst I've ever seen" is hyperbolic. My main point was, it's a sloppy query, could probably be done with a few WHERE clauses and an inner join instead, and is more evidence of shoddy coding practices.