Skip to content
Datablare
Claude Code Manufacturing Operations

Shift performance across the plant

The night shift reaches 80.9% of plan against 86.9% in the morning, scraps 4.2% and loses 1,357 hours.

Data
Synthetic manufacturing plant demo data (PostgreSQL)
Asked in
Claude Code
Updated
Try this on your data

1 · The brief

What Claude Code was asked

Compare our shifts for 2026: good units, plan attainment, scrap rate and downtime by shift, how plan attainment by shift moved month by month, and which shift loses the most time on which lines.

Given exactly like this. Claude Code asked Datablare which tables it could read, wrote the SQL itself, ran each query through Datablare and built the dashboard from what came back.

2 · The dashboard

The dashboard Claude Code built

Shift performance across the plant dashboard: Plan attainment by shift, per month, Downtime hours by shift, Downtime by line and shift, Scrap rate by shift

Built from 3 read-only queries. Every figure on the dashboard was read from the database through Datablare; nothing was estimated or typed in.

Headline numbers (January–October 2026):

  • Morning plan attainment: 86.9% (1,582,348 good units)
  • Evening plan attainment: 86.9% (1,587,221 good units)
  • Night plan attainment: 80.9% (1,473,165 good units)
  • Night scrap rate: 4.2% (vs 2.6% in the morning)

What stands out:

  • Plan attainment by shift, per month: The night shift trails every month
  • Downtime hours by shift: Night: 1,357 hours, 1.7× the morning
  • Downtime by line and shift: Night downtime is higher on every line
  • Scrap rate by shift: Night scraps 4.2% of output

The data is a synthetic manufacturing plant dataset made for this example, so the numbers describe no real company. The queries, the dashboard and the audit entries are real: Claude reached the database only through Datablare, read-only, and every query is on record with the question it served.

3 · What Datablare ran

3 read-only queries, nothing changed

Each query below is copied from the audit log of this run. Datablare checked that it only reads, ran it read-only, and gave only the rows to Claude Code; it never stores them.

  1. Query 1

    Good units, plan attainment, scrap rate and downtime hours by shift, 2026

    3 rows · 71 ms

    SELECT shift, sum(good_units) AS good_units,
           round(sum(good_units)::numeric / sum(planned_units), 4) AS plan_attainment,
           round(sum(scrap_units)::numeric / sum(good_units + scrap_units), 4) AS scrap_rate,
           round(sum(downtime_min) / 60.0, 0) AS downtime_hours
    FROM manufacturing.production_runs
    WHERE run_date >= DATE '2026-01-01'
    GROUP BY 1
    ORDER BY 3 DESC
  2. Query 2

    Plan attainment by shift and month, 2026

    30 rows · 84 ms

    SELECT to_char(date_trunc('month', run_date), 'YYYY-MM') AS month, shift,
           round(sum(good_units)::numeric / sum(planned_units), 4) AS plan_attainment
    FROM manufacturing.production_runs
    WHERE run_date >= DATE '2026-01-01'
    GROUP BY 1, 2
    ORDER BY 1, 2
  3. Query 3

    Downtime hours by line and shift, 2026

    18 rows · 64 ms

    SELECT l.name AS line, r.shift, round(sum(r.downtime_min) / 60.0, 0) AS downtime_hours
    FROM manufacturing.production_runs r
    JOIN manufacturing.lines l ON l.id = r.line_id
    WHERE r.run_date >= DATE '2026-01-01'
    GROUP BY 1, 2
    ORDER BY 1, 2
Tables read manufacturing.linesmanufacturing.production_runs

4 · The audit entry

Who asked what, on record

Every query is recorded with the person who asked, the question in their words and why the agent ran it. Admins see this in the audit log; nothing reaches the database without it.

How the audit log works

query_data_source

via Claude Code

Allowed
Who
The person signed in (hidden on this public page)
Question
Compare our shifts for 2026: good units, plan attainment, scrap rate and downtime by shift, how plan attainment by shift moved month by month, and which shift loses the most time on which lines.
Intent
Good units, plan attainment, scrap rate and downtime hours by shift, 2026
Result
3 queries, 51 rows, read-only

More use cases

All examples
  • Plant comparison: output and attainment dashboard: Good units per month by plant, Plan attainment by plant, Downtime by plant and reason, Plants
    Claude Code Manufacturing Executive overview

    Plant comparison: output and attainment

    Pune leads output with 1,575,170 good units; Chennai trails at 82.5% of plan, held back by breakdowns.

    Updated Open

  • Production output, yield and downtime dashboard: Good units per week, Downtime by line, Downtime by reason, Scrap rate by line, Lines
    Claude Code Manufacturing Operations

    Production output, yield and downtime

    4.64M good units at 96.9% yield and 84.9% plan attainment, with downtime by line and reason pointing at Line B2.

    Updated Open

  • E-commerce sales and retention dashboard dashboard: Monthly revenue, Revenue by category, 2026, Lifetime revenue per customer, by channel, Orders per month
    Claude Code E-commerce Executive overview

    E-commerce sales and retention dashboard

    ₹5.21M revenue from 11,897 orders this year, a 57.9% repeat-customer rate, and which channels bring the customers who spend most.

    Updated Open

Build this on your own data.

Connect your database, choose the tables Claude may read, and give it the same brief. Claude is connected in about two minutes.

30 minutes with the founder. Or WhatsApp / [email protected]