Skip to main content
Admissions guidance, study banks, and career tools — get started on Shalyam

On-Time Rate per Supplier

For each supplier return the percentage of received orders delivered on or before the expected date, rounded to 1 decimal. Ignore orders not yet received. Order by supplier name.

Table schema

Suppliers(supplier_id INT PRIMARY KEY, name VARCHAR(20))
PurchaseOrders(po_id INT PRIMARY KEY, supplier_id INT, order_date DATE, expected_date DATE, received_date DATE)

Sample data

Suppliers
supplier_id | name
1 | Acme
2 | Bolt
3 | Cargo

PurchaseOrders
po_id | supplier_id | order_date | expected_date | received_date
1 | 1 | 2026-03-01 | 2026-03-10 | 2026-03-09
2 | 1 | 2026-03-05 | 2026-03-15 | 2026-03-18
3 | 2 | 2026-03-02 | 2026-03-12 | 2026-03-12
4 | 2 | 2026-03-20 | 2026-03-30 | NULL
5 | 3 | 2026-03-10 | 2026-03-25 | 2026-03-29
6 | 3 | 2026-03-11 | 2026-03-20 | NULL

Discussion

No discussions yet.

Rewards · v2.1

Get Exclusive Insights with Every Issue

Join Shalyam Newsletter

Stay ahead in education, research, and innovation—straight to your inbox.