Baselight
SELECT 
    age_group,
    AVG(app_usage_time_min_day) AS average_app_usage,
    AVG(screen_on_time_hours_day) AS average_screen_hours,
    AVG(data_usage_mb_day) AS average_usage_mb,
    -- Count of Android users in each age group
    COUNT(CASE WHEN operating_system = 'Android' THEN user_id END) AS android_count,
    -- Count of iOS users in each age group
    COUNT(CASE WHEN operating_system = 'iOS' THEN user_id END) AS ios_count
FROM (
    SELECT 
        user_id,
        operating_system,
        app_usage_time_min_day,
        screen_on_time_hours_day,
        data_usage_mb_day,
        battery_drain_mah_day,
        CASE 
            WHEN age BETWEEN 18 AND 24 THEN '18-24'
            WHEN age BETWEEN 25 AND 34 THEN '25-34'
            WHEN age BETWEEN 35 AND 44 THEN '35-44'
            WHEN age BETWEEN 45 AND 54 THEN '45-54'
            WHEN age >= 55 THEN '55+'
            ELSE 'Unknown'
        END AS age_group
    FROM @kaggle.valakhorasani_mobile_device_usage_and_user_behavior_dataset.user_behavior_dataset
) AS subquery
GROUP BY age_group
ORDER BY age_group ASC;
age_groupaverage_app_usageaverage_screen_hoursaverage_usage_mbandroid_countios_count
18-24297.83636363636365.6309090909090911012.96363636363648624
25-34256.90109890109895.021978021978025885.379120879120914636
35-44253.38271604938274.948148148148145855.493827160493912834
45-54289.00609756097565.6280487804878041001.695121951219613727
55+266.18292682926835.279268292682927919.35365853658545725

Share link

Anyone who has the link will be able to view this.