Left Join Visualizer

ACCTG 6155 · Week 3 · Why an INNER JOIN can quietly lose money in cash application

The scenario The lockbox bank just handed Summit Gear six new payments to apply. To match each payment to its invoice (and confirm the amount), you join the lockbox_payments table to the invoices table on invoice_id. But two of the payments reference invoices that do not exist in our system, the lockbox mis-coded the checks. Watch what each join does with that gap.

1. The two source tables

lockbox_payments (6 rows, every payment the bank deposited this week)
payment_idinvoice_idamount
invoices
invoice_idcustomer_nameamount_due
Two gaps, not one Our invoices table has four rows, and only three of them match a payment. Two payments, PAY-9004 and PAY-9006, point at invoices (INV-2026-900000, INV-2026-900001) that nobody can find. One invoice, INV-2026-0061, has no payment at all. Those are two different problems, and which one you can see depends on how you write the join.

2. Write the join

The question you are asking:

Join type:
Loading the SQL engine and the two tables.

3. The join result

Result
Rows in result
0
On this report
$0
On file
$0
Missing from the report
$0

4. Reconcile the orphans

In real cash-app work, the fix for a dropped row is to track down the missing invoice. It might be in another AR system, on a colleague's desk, or one phone call away at the customer or the lockbox bank. Simulate finding them and watch the INNER JOIN stop losing payments.

Then flip the question. Locating those two invoices closes the cash gap. It does nothing for INV-2026-0061, which nobody has paid.

What to take away