05-11-2014 09:54 PM
I am trying to filter down a list of all listed US companies and their dividend payouts over 10 years, to a list of all listed US companies which have at least one dividend payout over the 10 year period.
I have managed to filter out any companies which do not operate over the full 10 years by doing the following;
CREATE TABLE DDM AS
SELECT LPERMNO, datadate, fyear, csho, dvc, ni
GROUP BY 1
Which took me long enough in itself, yet this list is not all that I require as the companies must also be paying dividends.
Is there a way of filtering the data subject to the above, but also subject to the criteria that AT LEAST 1 'dvc' is > 0 for each LPERMNO (Company)?
I do not want to get rid of all LPERMNO's which have a 'dvc' = 0, just the LPERMNO's where no 'dvc's exist.
Please let me know if more clarification is required.
05-11-2014 10:46 PM
Sorry, my data has already been collected and filtered to be from December 1997 to December 2008, hence why there are 12 observations per company (LPERMNO).
max(dvc) GT 0 did the trick though, thank you so much for your help!