QRFY model
Scans by location and device
Where and on what devices codes are scanned: QRFY's country, city and operating-system breakdowns, per code per month.
- Grain
- one row per month (UTC) x QR code (scan_url) x country x city x operating system
- Built from
- 1Raw tables
- 1Staging
- 1Core
- 1Analytics
- Reads from QRFY
- analytics
- Ships as
- Weld and dbt SQL, open source on GitHub
core.qrfy.scans_by_location_and_device
1-- core.qrfy.scans_by_location_and_device
2-- Where and on what devices codes are scanned: QRFY's country, city and operating-system
3-- breakdowns, per code per month.
4--
5-- Grain: one row per month (UTC) x QR code (scan_url) x country x city x operating system.
6-- Depends on: staging.qrfy.analytics
7--
8-- Location is QRFY's IP-based estimate, so city is approximate and can be empty. OS
9-- version is left out of the grain to keep rows readable; it is on the staging model if
10-- you need it.
11
12SELECT
13 DATE_TRUNC(DATE(scanned_at), MONTH) AS month,
14 scan_url,
15 country_iso,
16 country,
17 city,
18 os,
19 COUNT(*) AS scans,
20 COUNTIF(is_unique_visitor) AS unique_scans
21FROM {{staging.qrfy.analytics}}
22GROUP BY 1, 2, 3, 4, 5, 6This model and the 2 it depends on. Deploy them together; refs like {{staging.…}} resolve to the matching folders in Weld, and the dbt view uses source() and ref().
Notes
How it counts. And where it stops.
Location is QRFY's IP-based estimate, so city is approximate and can be empty. OS version is left out of the grain to keep rows readable; it is on the staging model if you need it.
Raw tables it reads
- raw.qrfy.analytics
More QRFY models
Put QRFY in front
of your agents.
Connect QRFY, deploy the models, and ask questions in Claude, Cursor or ChatGPT. Free for 14 days, no credit card.