Reconciling a Day’s Sales

Reconcile SQLite orders, payments and refunds without duplicated totals, then deliver complete order and stall CSV files.

ProjectSQLiteDatabase

Introduction

Reconciling a Day’s Sales is a practical SQLite project for learners ready to turn basic SELECT queries into a reliable closing handover for a small market shop.

Two Guided Labs first expose duplicated money totals, then build reusable per-order calculations and real CSV files. One independent Challenge transfers the same methods to a workshop shop with different orders and money events. Every unit starts with its own prepared ledger.

What You Will Learn

  • Total item lines, successful payments and successful refunds separately before joining them by order ID.
  • Retain unpaid orders, separate equal-value events and exact customer labels using views, LEFT JOIN, COALESCE and CTEs.
  • Calculate integer-cent net receipts, differences and individual settlement statuses; distinguish them from a balanced overall total.
  • Save reusable SQL and use supplied tools to export and read complete order and stall CSV files with correct quoting.

Who This Course Is For

This course suits SQL beginners who want to make business totals trustworthy. You need basic terminal navigation and SQL SELECT/WHERE knowledge. Aggregation, joins, views and CTEs are explained before use.

LabEx provides SQLite, synthetic data and a browser-based Terminal. No local installation, Python programming, payment account or accounting background is required.

Frequently Asked Questions

Do I build an application or write an exporter?

You write SQL. Supplied tools export its actual result and read the saved CSV files; they do not repair a wrong query. You preserve the original ledger and tools.

What does reconciliation mean here?

Compare each order's item value with succeeded payments minus succeeded refunds, all in integer cents. This simplified receipt exercise excludes taxes, currency conversion and payment-provider settlement. The Challenge uses only mechanisms taught in the Guided Labs.

Teacher

labby
Labby
Labby is the LabEx teacher.