Hello, SQL 2008
I want to count the number of phone calls by client but also the number of calls by the phone number currently have two queries
Is there a way to do this in one query? Or would it be a sub query?
Sorry if this does not make sense as I am getting ready to call it a day.
Thanks for any assistance.
djj
The Lord is My Shepard (Psalm 23) - I need someone to lead me!
I want to count the number of phone calls by client but also the number of calls by the phone number currently have two queries
Code:
SELECT Client, PhoneN, Count(*) as PCnt
FROM mytable
GROUP BY Client, PhoneN
SELECT Client, Count(*) as CCnt
FROM mytable
GROUP BY Client
Sorry if this does not make sense as I am getting ready to call it a day.
Thanks for any assistance.
djj
The Lord is My Shepard (Psalm 23) - I need someone to lead me!