Hello,

I am working on a prescribing data set containing details of about 100,000 people. The lay out is similar to the table below:
ID Gender (0=male, 1=female) Paracetamol_2002 (0=no, 1=yes) Paracetamol_2002_count Codeine_2002 (0=no, 1=yes) Codeine_2002_Count Ibuprofen_2002 (0=no, 1=yes) Ibuprofen_2002_Count
Pat01 0 1 15 0 0 1 1
Pat02 0 1 7 0 0 1 4
Pat03 1 1 3 1 4 0 0
Pat04 0 0 0 1 6 1 6
Pat05 1 0 0 1 12 0 0
Pat06 1 1 12 1 12 0 0
Pat07 1 0 0 0 0 0 0
Pat08 0 0 0 1 9 1 18
Pat09 1 0 0 1 1 1 5
















There is information on 23 different medicines covering a period of 5 years. I need to find out the following:
1. how many prescriptions were issued for each medicine in each year- for this is used the command 'count if Paracetamol_2002_count > 0'. is this the best way to do this? i also tried commands such as 'tab paracetamol_2002_count'.
2. How many people received those prescriptions in a given year- i tried 'count if Paracetamol_2002 > 0' but it didn't quite work. Any suggestions on how i might do this? How do i work out how many women for instance, received prescriptions for each drug in a given year?

I appreciate that these might be somewhat elementary questions but i would really appreciate any help i can get.