Created
May 1, 2016 02:29
-
-
Save gordonje/fb858960bc249cf9a2a581212eccbb8b to your computer and use it in GitHub Desktop.
F460 part4 vs part5
This file contains 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 date_part('year', "DEADLINE") as deadline_year, COUNT(*) | |
FROM "FILER_FILINGS_CD" as a | |
JOIN "FILING_PERIOD_CD" as b | |
ON a."PERIOD_ID" = b."PERIOD_ID" | |
WHERE "FILING_ID" in ( | |
SELECT "FILING_ID" | |
FROM "CVR2_CAMPAIGN_DISCLOSURE_CD" | |
WHERE upper("F460_PART") in ('4A', '4B') | |
) | |
GROUP BY 1 | |
ORDER BY date_part('year', "DEADLINE"); |
This file contains 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
deadline_year count | |
------------- ----- | |
1999.0 7 | |
2000.0 994 | |
2001.0 630 |
This file contains 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 date_part('year', "DEADLINE") as deadline_year, COUNT(*) | |
FROM "FILER_FILINGS_CD" as a | |
JOIN "FILING_PERIOD_CD" as b | |
ON a."PERIOD_ID" = b."PERIOD_ID" | |
WHERE "FILING_ID" in ( | |
SELECT "FILING_ID" | |
FROM "CVR2_CAMPAIGN_DISCLOSURE_CD" | |
WHERE upper("F460_PART") in ('5A', '5B') | |
) | |
GROUP BY 1 | |
ORDER BY date_part('year', "DEADLINE"); |
This file contains 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
deadline_year count | |
------------- ----- | |
2000.0 53 | |
2001.0 573 | |
2002.0 1635 | |
2003.0 1186 | |
2004.0 1776 | |
2005.0 1100 | |
2006.0 2266 | |
2007.0 1149 | |
2008.0 2228 | |
2009.0 1262 | |
2010.0 2959 | |
2011.0 1232 | |
2012.0 2615 | |
2013.0 1388 | |
2014.0 2669 | |
2015.0 959 | |
2016.0 230 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment