use arnold;

$digest_users = (
SELECT
    count(*)
FROM arnold.`home/webmaster/prod/user/user-notification-settings/user-notification-channel-settings`
where notification_type = 'DIGEST'
and channel_email
);

$lite_digest_users = (
SELECT
    count(*)
FROM arnold.`home/webmaster/prod/user/user-notification-settings/user-notification-channel-settings`
where notification_type = 'DIGEST_LITE'
and channel_email
);

INSERT INTO `//home/webmaster/prod/analytics/digest/daily_user_host`
SELECT
    CAST(CurrentUtcDate() as String) as `date`,
    $digest_users as full_users_count,
    $lite_digest_users as lite_users_count;