This question reminded me of something that I've never understood. You would get the same answer to the question if the where statement looked like this:
where lastname like 'Smith%'
and firstname like '%a%'
and ID in ()
that is, without the parentheses. What I don't understand is why people write code with parentheses when all the conditions are equivalent in evaluation. If all you have are ANDs or all you have are ORs, what purpose is there to putting parentheses around the individual conditions? I was taught that you only needed parentheses when you were combining ANDs and ORs. Is that true, or do all these what seem to be extra parentheses have some value?