A developer defines the following measure in the order_items view:
The code must validate without errors.
Which action should thedeveloper take?
A developer needs to model out LookML to convert existing reports into Looker. The existing reports are:
Report 1: A report with order and order_items data, which finds the order with the largest total value of the order_item prices.
Report 2: A report with order and order_items data, which finds the order with the largest total number of products ordered.
Report 3: A report with data on every product, whether or not it has been ordered.
Each database table used is updated in real time as orders are made.
How should the developer construct an Explore using the order_items view as the base view?
After running the LookML Validator, a developer sees the following error message in the Looker development environment:
“Measures with Looker aggregations (sum, average, min, max, list types) may not reference other measures”.
What could be causing this error?
A user reports the following SQL error when selecting the discounted sale price field:
ERROR: column “order_items.sale_price”; must appear in the GROUP BY clause or be used in an aggregate function.
The developer checks the field definition and finds it to be:
measure: discounted_sale_price {
type: number
sql: ${sale_price} * 0.8 ;;
}
The developer also finds the LookML definition of the sale_price field to be:
dimension: sale_price {
type: number
sql: ${TABLE}.sale_price ;;
}
What isthe likely cause of the SQL error?