Create HAVING clause and GROUP BY without it in SELECT clause

Hi, 

Is there a way in LookML or within the Explore itself to replicate the following SQL query - where `order_id` and `customer_id` are dimensions?

The issue I’m having is I want to have `customer_id` in the GROUP BY clause but not in the SELECT clause, and I also want to have `order_id` in the HAVING clause. 

SELECT SUM(count_order_id) AS total_orders_made_by_same_customers
FROM (
SELECT
COUNT(order_id) AS count_order_id
FROM my_table
GROUP BY customer_id
HAVING COUNT(order_id) > 1
)
1 0 339
0 REPLIES 0
Top Labels in this Space
Top Solution Authors