That update may be wonky and might need a subquery, but you get the idea. Still, it's ugly as all getout. Is there a way to accomplish this in a single select, or at least more gently than three queries and a table variable?

Argh, sorry -- my sample data was ambiguous. I don't care about getting the min(i_users); I care about getting one i_users for each state, and I want the i_users for whom the myOrder is the lowest value for that state. Here, let me provide new sample data: