i have table in SAS Enterprise Guide like below:
Below table DOES NOT have duplicates in ID column.
ID | TARGET
----|--------
123 | 0
456 | 0
777 | 1
889 | 0
122 | 1
And I would like to aggregate above table with sample data (original table has many more data) to have something like below:
Q_0 - number of ID with '0' in column TARGET
Q_1 - number of ID with '1' in column TARGET
P_0 - prcent of ID with '0' in column TARGET
P_1 - prcent of ID with '1' in column TARGET
Q_0 Q_1 P_0 P_1 COL1 3 2 0.6 0.4 XXX
How can I do that in SAS Enterprise Guide in normal SAS or in PROC SQL ?