A query starts with .select A query must return a date column. A query must return at least one for thevalue column (which can be numbers or dates).variables A query can return optional columns for dimensions, dimension mappings, or cohorts. Linked dimensions must be included in the following form (using backticks)`from dimension > to dimension`
A query must contain followed by thefrom name of the table the data is to be extracted from.
The data is queried from the .users_table The first column ( ) has the dates of the transactions (timestamp or date type).date The second column ( ) contains the values of the "users" variable (number type).users The third column ( ) is a dimension column, the users are broken down by country (string).country The fourth column ( ) is a dimension mapping. The region is not an independent dimension, but the countries are assigned to regions.region as "country > region"

A → B A → C A → D
A → B and B → C simultaneously
Lease contracts are tied to specific vehicles/license plate (A → B) Vehicles are linked to vehicle types (B → C) The relationship isn't always 1:1 due to vehicles appearing in multiple contracts


The second query uses a (in this case, 1) to satisfy query requirements which will not be used in any model.fictional value Both queries use as date as a placeholder.null The mapping syntax uses to indicate the relationship direction.> This approach maintains data integrity while working within the system's constraints.
Last updated on Aug 16, 2023