Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Unique records by grouping

HI,


I need  count of accounts with below conditions  in single expression .


1.For Abc Name:

If same account is covered in 2  Abc names then count is 2 . The count will be taken from  unique group by Meeting ID

2.Other than  Abc Name

If  the same account is covered in 2 names other than  Abc names then count is 1 . The count will be taken from  unique group by Meeting ID

Note:Names with  prefixed with Abc called Abc Names

   

Meeting IDMeeting NameNameAccount ID
M01MMMAbc  phase1A001
M02AAAAbc phase2A002
M03DDDAbc Phase 3A001
M05EEEAbc phase 4A003
M06FFFAnoroA002
M07HHHAnoro1A003
M08JJJRelvarA003
M09FFFRelvar1A005

I want Output in below format::

The count will be taken from  unique group by Meeting ID

NameCount(Account ID)
Abc  phase1        2
Abc Phase 3
Anoro1        1
Relvar

Thanks in advance

2 Replies
MK_QSL
MVP
MVP

explain this please..

If same account is covered in 2  Abc names then count is 2 . The count will be taken from  unique group by Meeting ID

Not applicable
Author

In the above example Account Id A01 is covered in two abc names i.e  Abc  phase1,Abc  phase 3 .Now count of account id  is 2. Group by Meeting ID(M01 and M03)