Colbert allows to solve problems in SQL that otherwise would have to be solved outside the database for a multiple of cost and completion time.
We have listed a couple of examples below. See how easy problems can now be solved in SQL and realize how difficult, if not impossible, it would be to solve this in SQL without Colbert !
A formula can have a result of any type: for instance, a boolean formula Find can define criteria to indicate a person’s interest in a particular second hand car.
Show which car matches the search criteria for every buyer.
Buyer join Cars where Find
Calculate the individual annual employee bonus
With a field Bonus of type <Expr>double , the agreed annual employee bonus can easily be calculated.
Show the individual annual employee bonus.
Name, Year, Bonus from Employees natural join Sales
where Year between 2016 and 2018
To determine risk scores for a population, two formulas are
defined in the Risk table: a boolean risk criterion and an integer score calculation: If the criterion holds, the score contributes to a risk.
Show the caclulated risk Scores for the matching Crit.
Fam.*, AgeOf BirthDate as Age, Code Crit, Code Score, Score
from Fam join Risk on crit
Divide a population into cohorts based on a formula
Sometimes it is not precise enough to divide a population into cohorts based on field values. Sometimes you want to divide a population into several cohorts by assigning characteristics based on formulas.
With Colbert you can apply these formulas with a SQL join to a population to get the right cohort division.
Name, CohortName from Fam
join first (FamCohort order by Rank) on Def