This comes from the ASE certification exam?
IMO the answer should be 4), although 3) could potentially also qualify (more on that below).
Reason is that hashing allows you to find identical (or non-identical) values very efficiently, which is suitable for many things such as distinct and group by.With distinct and group by, there is no requirement for any visible ordering of data though: it just needs to be grouped/filtered but exactly how it is grouped/filtered doesn't matter. For order-by things are different because here the order of the result set is defined as the user will see it, and this is something hashing cannot be used for.
If course, distinct and group-by can be resolved by means of classical sorting, and this is how is always worked in pre-15, it's just that hashing tends to be more efficient.
Now, on option #3 (HAVING), that doesn't actually require any sorting: HAVING predicates are applied on the groups created by GROUP BY. As such you could argue there is actually no sorting involved at all, which makes 4) the better answer for this question. I think 3) is therefore not a good potential answer for this question; UNION would have been a better one.
Rob V.