'How to write SQL Query to find the revisiting users and new user for my website from events table - daily

SQL Query to calculate the number of revisiting and new users on my website from the events table

the table consists of all the frontend events captured on my website columns of the table look like

external_id session_id event_time capture_time
user_id device_id event_name event_data


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source