Hi,
I'm having difficulty with the following:
---------------------------------------------------
SELECT COUNT (*)
FROM OE_Orders AS s
WHERE EXISTS
( SELECT *
FROM OE_Orders AS t
WHERE s.CustomerKey = t.CustomerKey
AND t.CustomerKey= 1
)
GROUP BY s.CustomerKey
---------------------------------------------------
As you can see in my attachment I'm only getting zero values. I need each customer code to represent 1 stop, regardless of the number of orders.
Please help.
I'm having difficulty with the following:
---------------------------------------------------
SELECT COUNT (*)
FROM OE_Orders AS s
WHERE EXISTS
( SELECT *
FROM OE_Orders AS t
WHERE s.CustomerKey = t.CustomerKey
AND t.CustomerKey= 1
)
GROUP BY s.CustomerKey
---------------------------------------------------
As you can see in my attachment I'm only getting zero values. I need each customer code to represent 1 stop, regardless of the number of orders.
Please help.