Joins
Beyond advanced filtering, Elastic lets you combine tables and shape the result set with joins, sorting, and pagination.
Joins
Join another table into a query with join_type (inner, left, or outer) and join_keys to compose datasets into one row.
Sort and top-N
Order by any column and keep the top N — including top-N per group with limit_partition_by.
Optional filters and wildcards
Filters can be omitted on Elastic, and wildcard matching is supported in string values.
Joins
{
"report_query": {
"tables": [
{
"vtable": "traffic_and_engagement",
"granularity": "monthly",
"filters": {
"domains": ["amazon.com", "ebay.com"],
"countries": ["US"]
},
"metrics": ["all_traffic_visits", "desktop_visits"],
"start_date": "2026-01",
"end_date": "2026-03"
},
{
"vtable": "geography",
"granularity": "monthly",
"filters": {
"domains": ["amazon.com", "ebay.com"],
"countries": ["US"]
},
"metrics": ["country_share"],
"start_date": "2026-01",
"end_date": "2026-03"
}
],
"join_type": "inner"
},
"delivery_information": { "response_format": "csv" }
}A table query can join another table to compose multiple datasets into one report row. Set join_type to inner, left (default), or outer, and join_keys to the columns to join on.
Sort & pagination
Use a paging object — at the report level or per table — to order and limit results.
sort | Column to sort by. |
| Sort ascending. Defaults to false (descending). |
offset | Number of rows to skip. Defaults to 0. |
limit | Max rows, from -1 (all) up to 100,000,000. |
| A single column that turns limit into top-N per group (e.g. top 10 keywords per domain). |
Top 10 rows by visits, descending:
"paging": {
"sort": "all_traffic_visits",
"sort_asc": false,
"limit": 10
}
On this page
- Joins