Let me explain the current situation: Table structure and overview of data: I have a table with patient_ids, drug_name, episode_no for each drug a