Hey,
I’m looking for an easy way to use measure results as a dimension in outer query without creating a new derived table. Is it possible through defining a new dimension somehow or any other way?
Current query:
SELECT nr_of_orders, count(user_id)
FROM (
SELECT user_id, count(orders) as nr_of_orders
FROM orders
GROUP BY user_id) trips
GROUP BY nr_of_orders
Wanted result:
SELECT [new dimension], count(user_id)
FROM orders
GROUP BY 1