Practical PQL Exercises

Database: Accounts Payable

Exercises:

Exercise 1: Calculate the total amount of unpaid invoices for each vendor.


Exercise 2: Find the average number of days invoices are overdue for each vendor.


Exercise 3: List vendors with more than 5 overdue invoices.


Exercise 4: Calculate the total payment amount made via 'Bank Transfer' in the last 30 days.


Exercise 5: Get the name of the vendor for the invoice with the highest amount.


Exercise 6: Count the number of distinct payment methods used.


Exercise 7: For each vendor, list their invoice IDs concatenated by a comma, for invoices created this year.


Exercise 8: Find the median invoice amount for invoices due next month.