Better SQL query

From
http://stackoverflow.com/questions/27222309/select-a-particular-row-in-when-there-are-multiple-options/27224333?iemail=1&noredirect=1#27224333