Example queries
Example queries showing IQL syntax.
Query one category
Obtain count of values in a single category.
SELECT
AGGREGATE(
"Frequency of Orders"/"Order Frequency"
)
FROM A
SELECT
AGGREGATE(
"Marital Status"/"Marital Status"
)
FROM C
SELECT
AGGREGATE(
"Method of Payment"/"Method of Payment - UK Payment Markets"
)
FROM A
Query two categories
Obtain count of values broken down by two categories.
SELECT
AGGREGATE(
"Personal Income"/"US Census Income Range",
"Frequency of Orders"/"Order Frequency"
)
FROM B
Apply filters
Apply a conditional filter on values in categories.
SELECT
AGGREGATE(
"Personal Income"/"US Census Income Range"
)
FROM B
WHERE "Marital Status" = 'Married, including separated'
ENRICH WITH C
SELECT
AGGREGATE(
"Frequency of Orders"/"Order Frequency"
)
FROM A
WHERE Age > 40
ENRICH WITH D
SELECT
AGGREGATE(
"Frequency of Orders"/"Order Frequency"
)
FROM A
WHERE Age < 40
AND "Marital Status" = 'Married, including separated'
ENRICH WITH C, D
SELECT COUNT()
FROM A
WHERE A.Age BETWEEN 20 AND 50
SELECT COUNT()
FROM A
WHERE A.Gender/"Binary and Other" IN ('Female','Other')
Query the intersection
Find individuals that appear in both datasets.
SELECT
AGGREGATE(
"Frequency of Orders"/"Order Frequency"
)
FROM A INTERSECT B
SELECT
AGGREGATE(
"Frequency of Orders"/"Order Frequency"
)
FROM (A INTERSECT B) INTERSECT C
To build, test and run queries, try using the Query Tool.