Hi Adriano! I'm not sure if this helps but, DISTINCT will return a row for each distinct combination of all the columns listed in your SELECT. Since you have timestamp listed, the DISTINCT won't be doing much as the timestamps for each page view will be unique. So you can probably just leave the DISTINCT off.
In general thought the query looks ok to me. Growthbook will then take this query and run sums per user on it and then average that. I'm not sure I understand what you are seeing that is not what is expected. It might be helpful to you though to understand what is happening by looking at the exact sql that growthbook is running. You can see that in the growthbook UI by going to the metrics page ("/metrics"), clicking on the page_view metric , clicking "Run analysis" or "Refresh data", then clicking on "view queries".
Let me know if there is anything else I can do to help you figure this out.