title: Want to count occurrence, then only print count values which are higher than the average of all counted values
body: <p>So, I was trying to count the number of times a patient went to the hospital for each of the available 10 patients (including those who does not went at all, for no good reason), but only wanting to print the ones whose visit count is higher than the average of all recorded visit counts.
  How can I do this, when I can't compare any count values in the WHERE and HAVING clauses, and can't precalculate the average first the compare to it later). Please help</p>