Created
September 22, 2016 16:52
-
-
Save gordonje/5790d5f664f02128ae4b99f3932f8196 to your computer and use it in GitHub Desktop.
link types of duplicate links
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
select link_group_id, link_type_description, count(*) | |
from calaccess_processed_candidate_committees a | |
join ( | |
select cand_filer_id, committee_filer_id, count(*) | |
from calaccess_processed_candidate_committees | |
group by 1, 2 | |
having count(*) > 1 | |
) as dupes | |
on a.cand_filer_id = dupes.cand_filer_id | |
and a.committee_filer_id = dupes.committee_filer_id | |
group by 1, 2 | |
order by count(*) desc; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment