on 04-29-2016 4:28 PM
I have a report column that is counting the number of records in the database under a certain agreement name, if the matter has this agreement name it is being counted in this column. However when I try to sum the column my summary field is counting duplicates of random agreement names. How do I get the sum for this column without the duplicate information?
(Say for the cell that says 33, some of those are pulling more than once into the view due to different cross reference information, the 33 is correct but when I total it I am getting a count of those 33 plus 4 of the duplication's) I hope I am explaining this properly.
Thank you in advance,
Hi Matt,
How do you 'count' these agreements?
Is that using a formula? Could you post the formula as well?
-Abhilash
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
This is how I am creating the table for the column:
CREATE OR REPLACE FORCE VIEW "GOOGLE_tgg"."COUNT_DD"
(
"LEGACY_FILE_M",
"AGMT_NAME",
"NUM_FILES"
)
AS
SELECT legacy_file_m, agmt_name, COUNT (arrg_key) NUM_FILES
FROM ALL_AGREEMENTS
WHERE legacy_file_m = '123456.001' AND SUBJ_CODE = 'LSE'
GROUP BY legacy_file_m, agmt_name
Hello Matt,
Could you please try counting distinct records with below SQL?
CREATE OR REPLACE FORCE VIEW "GOOGLE_tgg"."COUNT_DD"
(
"LEGACY_FILE_M",
"AGMT_NAME",
"NUM_FILES"
)
AS
SELECT legacy_file_m, agmt_name, COUNT (Distinct arrg_key) NUM_FILES
FROM ALL_AGREEMENTS
WHERE legacy_file_m = '123456.001' AND SUBJ_CODE = 'LSE'
GROUP BY legacy_file_m, agmt_name;
Regards
Niraj
User | Count |
---|---|
88 | |
23 | |
11 | |
9 | |
8 | |
5 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.