I have a table that has patient-id, visit year, plus some other columns....
It is possible to write some sql that produces a simple frequency table that shows me year and number of visits for each patient?
I am particularly interested in seeing which years the patient did not make any visit, but also need to see how many visits per year in the other years. i.e. i dont want to exclude the years the patients did not visit.
Also if it is possible I would like to go a step further an see the distribution of the number of visits. What i mean by this is I would like to see for each year how many patients made zero visits, how many one, how many two, how many three etc.