A
ainese
I have a table with ESN and SERVICE types,
Each ESN can have up to 3 service types. I am trying to select where
SERVICE Type is only equal to basic, but i get duplicates with the
below query.
Can anyone help with what code can be used for this type of query
please?
SELECT DISTINCT (Count(F.ESN)) AS ["Basic Activations"]
FROM Data AS F INNER JOIN Data AS G ON (F.ESN= G.ESN AND F.SERVICE=
"Basic" AND G.SERVICE <>"Data Push" AND G.SUBSCR_TYPE = "Service
Activation")
WHERE G.ESN NOT IN
(SELECT ESN FROM Data WHERE SERVICE = 'Tracking' );
thanks in advance,
Aine
Each ESN can have up to 3 service types. I am trying to select where
SERVICE Type is only equal to basic, but i get duplicates with the
below query.
Can anyone help with what code can be used for this type of query
please?
SELECT DISTINCT (Count(F.ESN)) AS ["Basic Activations"]
FROM Data AS F INNER JOIN Data AS G ON (F.ESN= G.ESN AND F.SERVICE=
"Basic" AND G.SERVICE <>"Data Push" AND G.SUBSCR_TYPE = "Service
Activation")
WHERE G.ESN NOT IN
(SELECT ESN FROM Data WHERE SERVICE = 'Tracking' );
thanks in advance,
Aine