I got a job on sql at the interview:
Get the name and the number of times it was repeated, but display only those names that were repeated more than 2 times - sorting by the number of repetitions, from major to minor.
My decision was:
select name, count(name) from table group by name having count(name) > 2 order by count(name) desc; The interviewer's feedback was: the request is "almost" correct .
Can someone suggest how to change or improve it?