Given a table of prescription transactions and a table of members, write a query to find the total prescriptions per member for the last 30 days.
Return every member, including members with no prescriptions during the period. Treat the last 30 days as transactions from the current date through 30 days earlier, inclusive.
member_id, member_name, and total_prescriptionsmember_id ascending| Column | Type | Description |
|---|---|---|
| member_idPK | INT | Unique Optum Rx member identifier |
| member_name | VARCHAR(100) | Member's full name |
| Column | Type | Description |
|---|---|---|
| transaction_idPK | INT | Unique prescription transaction identifier |
| member_id | INT | Member associated with the prescription transaction |
| transaction_date | DATE | Date the prescription transaction occurred |