Query Console
SELECT · JOIN · GROUP BYeditable
Ctrl+Enter to execute · params bind with ?
idle
Execution plan
hash join—
Engine notes
LEFT JOIN semantics. A date predicate in
WHERE nullifies unmatched rows; moving it into ON preserves employees with zero logged hours. Load the “Naive LEFT JOIN” preset to see rows silently vanish.Functional dependency.
GROUP BY e.employee_id permits e.name because employee_id is the primary key of employees — anything else raises must appear in GROUP BY.AVG over rows ≠ AVG over heads.
AVG(e.hourly_rate) in Q4 averages per timesheet row, weighting frequent reporters. Head-weighted rate is shown beside it.Log time
INSERT INTO timesheetsrows land as pending
Cost preview
$0.00
estimated labor cost
Employee rate–
Hours–
Week to date (approved)–
Overtime premium–
Project budget left–
Recent entries
0Approval workflow
manager queue–
Audit log
0 eventsQ1 · Weekly timesheet summary
BETWEEN ? AND ?SQL
Q2 · Project budget tracking
approved = TRUESQL
Q3 · Employee utilization
LEFT JOIN · 30dSQL
Q4 · Department cost analysis
COUNT DISTINCT · 90d–90-day cost
SQL
Payroll run
approved rows onlyPayroll locks to approved timesheets. Pending rows are excluded and flagged as accrual so the run reconciles after approval.
–
Project cost split (payroll period)
Accrual · pending in period
Tables & indexes
–