Dear all,

I followed the wonderful asdoc command to create some tables.
I have in my dataset the same identification number for the companies since I am looking over a period (2005-2010). For each observation, I have different variables from Compustat for which I would like to get the mean, min, p25 median p75 and the max but only for each distinct permno (all years combined).

I used the following code:
bys total(permno): asdoc sum var1 var2 var3 var4 var5 var6, stat(N mean sd min p25 median p75 max)
It lists me line by line the stats for each different permno and the line that only interests me is the total line at the end of the list. How should I do to get the final line? Or should I create a table line by line with rowappend?

In another table, I would like to show different data like the fraction of share (in %), the number of firms owing x subsidiaries (so counting permno given another variable) and the number of owned subsidiaries by firms (in that it would be counting var1 given permno). In this case, is it the only solution to create the table line by line with rowappend?

Thank you very much for your insights.