Interview Guides
You are given payment activity and account master data. Write a PostgreSQL query that returns all unapplied cash payments — payments that were received but were not matched to an account — along with the payment details needed for reconciliation. Include payments with a missing account_id as well as payments whose account_id does not exist in the accounts table.