Skip to content

armgit / dub

Public Imported from GitHub
0

The modern link attribution platform. Loved by world-class engineering teams at Twilio, Zillow, Jobber, Vercel, Raycast, and more.

467 B
Raw Blame
DESCRIPTION >
	Only used for `/cron/aggregate-clicks` for now


NODE endpoint
SQL >

%
    SELECT
        link_id,
        country,
        COUNT(*) AS clicks
    FROM
        dub_click_events_mv
    WHERE
        link_id IN {{ Array(linkIds, 'String') }}
        AND timestamp >= {{ DateTime64(start) }}
        AND timestamp <= {{ DateTime64(end) }}
    GROUP BY
        link_id,
        country
    ORDER BY
        link_id ASC,
        clicks DESC

TYPE ENDPOINT