playground explore freely · no grades
SQL Playground
Explore any Runtime dataset with SQL. Nothing here affects course progress.
Four months of a fictional parcel network: shipments and packages moving from fulfillment centers through sortation hubs to delivery stations, with every scan, delivery attempt and return.
133,153 rows8 tables2025-01 – 2025-04
tables
Open a table to see what one row means, its columns and keys, and a preview. Start from shipments: it is the dataset's central table.
service_levels8 rows · 5 columns
One shipping service with its delivery promise.
- service_level_id
Service key
- service_code
Short code
- service_name
Service name
- promised_business_days
Business days from pickup to promised delivery (0 = same day)
- signature_required
1 when delivery needs a signature
carriers14 rows · 4 columns
One fictional transport carrier.
- carrier_id
Carrier key
- carrier_name
Carrier name
- carrier_type
parcel, regional, ltl, courier or air
- on_time_target_pct
Contracted on-time delivery target, percent
warehouses38 rows · 6 columns
One facility in the network: fulfillment center, sort hub, or delivery station.
- warehouse_id
Facility key
- warehouse_code
Facility code
- facility_type
fulfillment, sortation or delivery_station
- city
City
- state
State
- opened_at
Opening date
routes173 rows · 6 columns
One scheduled truck lane between two facilities.
- route_id
Lane key
- origin_warehouse_id
Departure facility
- destination_warehouse_id
Arrival facility
- carrier_id
Carrier operating the lane
- typical_transit_hours
Planned transit time
- distance_miles
Road distance
shipments8,200 rows · 12 columns
One customer order shipped as one or more packages.
- shipment_id
Shipment key
- order_reference
Shipper’s order number
- shipper_name
Sending business as typed on the label (inconsistent case and spacing)
- origin_warehouse_id
Fulfillment center
- destination_city
Recipient city
- destination_state
Recipient state
- destination_postal_code
Recipient ZIP as entered: may lose leading zeros, include ZIP+4, or be missing
- service_level_id
Service purchased
- carrier_id
Final-mile carrier
- created_at
Label created (UTC)
- promised_delivery_date
Promised delivery date
- declared_value
Declared value in USD
packages11,505 rows · 8 columns
One physical package within a shipment.
- package_id
Package key
- shipment_id
Shipment
- tracking_number
Tracking number as scanned (case and spacing vary)
- package_type
box, envelope, tube or pallet
- weight_kg
Weight in kg
- length_cm
Length in cm
- width_cm
Width in cm
- height_cm
Height in cm
tracking_events100,515 rows · 9 columns
One package scan or status update. Scans can repeat, go missing, arrive late, or show up out of order.
- event_id
Ingestion key
- package_id
Package
- event_type
What happened (picked up, in transit, delivered, exception, and similar)
- event_at
When the scan happened (UTC)
- recorded_at
When the platform received it (UTC)
- warehouse_id
Facility for facility scans; NULL on the road
- event_source
scanner, driver_app, carrier_api or manual
- exception_code
Reason on exception, rerouted and returned_to_sender events; NULL otherwise
- driver_id
Courier on out_for_delivery, delivery_failed and delivered events; NULL otherwise
delivery_attempts12,700 rows · 6 columns
One attempt by a driver to deliver a package.
- attempt_id
Attempt key
- package_id
Package
- attempt_number
1 for the first attempt
- attempted_at
Attempt time (UTC)
- outcome
delivered, recipient_absent, no_access, address_issue, refused or damaged
- driver_note
Free-text note typed by the driver; NULL for most deliveries
relationships
How to join these tables. Left column matches the right column.
- routes.origin_warehouse_id joins to warehouses.warehouse_id
- routes.destination_warehouse_id joins to warehouses.warehouse_id
- routes.carrier_id joins to carriers.carrier_id
- shipments.origin_warehouse_id joins to warehouses.warehouse_id
- shipments.service_level_id joins to service_levels.service_level_id
- shipments.carrier_id joins to carriers.carrier_id
- packages.shipment_id joins to shipments.shipment_id
- tracking_events.package_id joins to packages.package_id
- tracking_events.warehouse_id joins to warehouses.warehouse_id
- delivery_attempts.package_id joins to packages.package_id