What are window functions? What is partition by?
Asked in the data analyst panel stage. Demonstrate the answer using the provided transactions table.
transaction_id, cardholder_id, transaction_date, amount, transaction_number, and cardholder_total.cardholder_id ascending with null cardholders last, then transaction date and transaction ID.| Column | Type | Description |
|---|---|---|
| transaction_idPK | INT | Unique transaction identifier |
| cardholder_id | INT | Cardholder identifier |
| transaction_date | DATE | Date of the transaction |
| amount | DECIMAL(10,2) | Transaction amount |