The decision
Find high-value orders that are still in process.
The model uses the classic MySQL Sample Database. An equivalent SQL query would select customer orders with amount above 80,000 and status “In Process.”


Model the logic
Separate selection, concepts, and calculations.
The SelectedOrders DataSQL table handles record selection. Its matching glossary defines the selected-order attributes and the output concept Totals.
The DefineTotals table iterates over selected orders and accumulates their count and total amount. ShowResults prints the output, while the main table and Environment complete the model.






Run and explore
Execute rules directly against the database.
Start MariaDB, then run test.bat. The model reads the database and prints its totals. Run explore.bat to see the decision diagram and execute the model rule by rule and record by record.
Database-specific selection stays in DataSQL, while business analysts can extend or change the business logic without programming.


