Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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 ID | Meeting Name | Name | Account ID |
M01 | MMM | Abc phase1 | A001 |
M02 | AAA | Abc phase2 | A002 |
M03 | DDD | Abc Phase 3 | A001 |
M05 | EEE | Abc phase 4 | A003 |
M06 | FFF | Anoro | A002 |
M07 | HHH | Anoro1 | A003 |
M08 | JJJ | Relvar | A003 |
M09 | FFF | Relvar1 | A005 |
I want Output in below format::
The count will be taken from unique group by Meeting ID
Name | Count(Account ID) |
---|---|
Abc phase1 | 2 |
Abc Phase 3 | |
Anoro1 | 1 |
Relvar |
Thanks in advance
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
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)