Managerial Queries
Use this page as the managerial and cost-accounting query library. The groups below organize reusable SQL around cost management, portfolio performance, sales commissions, inventory and supplier behavior, manufacturing operations, workforce coverage, planning, replenishment, and design-service utilization.
Managerial Query Groups
Budget, cost center, and cost management
Use these queries to compare cost-center activity, budget expectations, and price-volume-cost budget bridges.
Open a query when you want to inspect the SQL, copy it into SQLite, or trace the source-table logic.
Portfolio, profitability, service, returns, and pricing
Use these queries to compare sales mix, product economics, contribution margin, service outcomes, returns, and commercial pricing pressure.
Open a query when you want to inspect the SQL, copy it into SQLite, or trace the source-table logic.
Inventory, purchasing, and supplier performance
Use these queries to inspect inventory movement, purchasing activity, and supplier receipt reliability.
Open a query when you want to inspect the SQL, copy it into SQLite, or trace the source-table logic.
Manufacturing, routing, throughput, labor, and capacity
Use these queries to connect BOM, routing, work-center load, work-order activity, labor support, and manufacturing variance.
Open a query when you want to inspect the SQL, copy it into SQLite, or trace the source-table logic.
Workforce coverage, planning, replenishment, and design-service utilization
Use these queries to review workforce structure, roster coverage, attendance pressure, forecast quality, replenishment recommendations, and design-service utilization.
Open a query when you want to inspect the SQL, copy it into SQLite, or trace the source-table logic.
Main Table Families
| Topic | Main tables |
|---|---|
| Budget vs actual | Budget, BudgetLine, CostCenter, Account, GLEntry, JournalEntry |
| Product portfolio and sales mix | Item, SalesInvoiceLine, CreditMemoLine, ShipmentLine, SalesOrderLine, Customer, PriceList, PriceListLine, PromotionProgram, PriceOverrideApproval |
| Sales commissions | SalesCommissionAccrual, SalesCommissionAdjustment, SalesCommissionRate, SalesCommissionPaymentLine, SalesInvoiceLine, CreditMemoLine, Employee, Customer |
| Inventory and purchasing | GoodsReceiptLine, ShipmentLine, SalesReturnLine, ProductionCompletionLine, PurchaseOrderLine, Supplier, Warehouse, Item |
| BOM, routing, and work-center planning | BillOfMaterial, BillOfMaterialLine, Routing, RoutingOperation, WorkCenter, WorkCenterCalendar, Item |
| Work-order throughput and variance | WorkOrder, WorkOrderOperation, WorkOrderOperationSchedule, MaterialIssueLine, ProductionCompletionLine, WorkOrderClose |
| Labor, headcount, payroll mix, and workforce planning | Employee, EmployeeShiftRoster, EmployeeAbsence, OvertimeApproval, TimeClockPunch, TimeClockEntry, LaborTimeEntry, PayrollRegister, WorkCenter, CostCenter |
Recommended Case Pairings
- Use Product Portfolio Profitability Case when you want a portfolio, lifecycle, and contribution-margin sequence.
- Use Workforce Cost and Org-Control Case when you want workforce structure, labor mix, and approval concentration in one lab.
- Use Workforce Coverage and Attendance Case when you want planned staffing, approved time, absences, and overtime in one operational lab.
- Use Demand Planning and Replenishment Case when you want forecast, replenishment, component-demand, and rough-cut capacity analysis in one sequence.
- Use Pricing and Margin Governance Case when you want commercial policy, promotion effect, override concentration, and collection-level margin analysis in one case.
- Use Product Portfolio Case when you want a lighter introductory entry point before moving into the broader profitability pack.
Interpretation Notes
- The item master now supports collection, style family, material, finish, color, lifecycle, and supply-mode analysis inside the existing
Itemtable. - The employee master now supports work location, job family, job level, employment status, and current-state active analysis without adding a separate HR-history model.
- Supply mode changes the meaning of cost analysis. Manufactured items can support both absorption and contribution-margin work because fixed overhead is stored separately.
- Portfolio mix and profitability should be read together with service-level measures such as fill rate, shipment lag, and return pressure.
- Work location and cost center answer different questions. Use both when students compare workforce structure to payroll or labor usage.
- Workforce-planning analysis is stronger now that rostered hours, approved worked hours, absences, raw punches, and overtime approvals can be compared directly.
- The dataset includes a weekly planning layer, so students can compare forecast, policy, recommendation, and rough-cut capacity pressure before execution starts.
- The dataset includes commercial-pricing coverage, so students can compare list price, resolved price-list pricing, promotions, overrides, and net realized margin without introducing a separate quote system.
- Sales commissions are modeled as a separate selling-cost subledger, so students can compare commission expense by rep, segment, and revenue type without mixing it into payroll.
- The budget model now starts from
BudgetLine, so students can move from forecast, planned price, standard cost, payroll, and timing assumptions into the summaryBudgettable and the pro forma statements. - The current manufacturing model is still a foundation. It supports operations, labor, and contribution-margin analysis without switching inventory valuation to actual cost.
- Demand-planning analysis is most useful when students connect
DemandForecast,InventoryPolicy,SupplyPlanRecommendation,MaterialRequirementPlan, andRoughCutCapacityPlanin one analytical path.