Activity table to include only the rows where activity_date is within the 30-day period ending on '2019-07-27'.user_id and count the distinct session_id for each user to get the number of sessions per user.IFNULL function to handle cases where there might be no sessions, and default the value to 0.00.ROUND function to round the average to two decimal places.
erDiagram
Activity {
int user_id
int session_id
date activity_date
enum activity_type
}