June 1, 2018 at 11:02 am
Hello All,
I am trying to calculate total DISTINCT COUNT for names.
Name | ID1 | ID2 | Visit Flag | |
P | 1 | 2 | Y | |
Q | 10 | 20 | Y | |
A | 30 | Y | ||
B | 40 | Y | ||
P | 1 | 2 | Y | |
Q | 1 | 2 | Y | |
C | 5 | Y | ||
Please help me out on this
Thanks
June 1, 2018 at 11:09 am
What have you tried so far? I suggest having a look at the documentation on COUNT: https://docs.microsoft.com/en-us/sql/t-sql/functions/count-transact-sql?view=sql-server-2017
Thom~
Excuse my typos and sometimes awful grammar. My fingers work faster than my brain does.
Larnu.uk
June 1, 2018 at 11:27 am
darsha.shashank - Friday, June 1, 2018 11:02 AMHello All,I am trying to calculate total DISTINCT COUNT for names.
Name ID1 ID2 Visit Flag P 1 2 Y Q 10 20 Y A 30 Y B 40 Y P 1 2 Y Q 1 2 Y C 5 Y Please help me out on this
Thanks
I agreed Thorn . Kindly go through the document suggested by Thorn.
SELECT COUNT(DISTINCT [name])
Saravanan
June 1, 2018 at 11:32 am
saravanatn - Friday, June 1, 2018 11:27 AMI agreed Thorn . Kindly go through the document suggested by Thorn.
SELECT COUNT(DISTINCT [name])
Thom*. I'm not a thorn, thanks. 🙂
Thom~
Excuse my typos and sometimes awful grammar. My fingers work faster than my brain does.
Larnu.uk
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply