I have a table with data similar to the following:
The longer I work on this, the uglier my SQL is getti
Try this:
select state_name,foo,max(dateUpdated) from state where state_name in (select state_name from state group by state_name having count(distinct foo)=1) group by state_name,foo;