You have a table with the stationary orders. You need to output a new column in the table with the order priority according to the total sum of money: less than $1000 is Low, from $1000 to $2000 is Medium, and more than $2000 is High.
Solution
Switch the page to the edit mode.
Insert the Table Transformer macro and paste the table or the macros outputting tables within the macro body.
Select the macro and click Edit.
In the Presets tab select Custom transformation and click Next.
Enter the following SQL query:
SELECT *,
CASE WHEN 'Subtotal' < 1000
THEN "LOW"
WHEN 'Subtotal' >= 1000 AND 'Subtotal' < 2000
THEN "MEDIUM"
ELSE "HIGH"
END
AS 'Priority'
FROM T1
SQL
CASE WHEN ... THEN ... ELSE ... END goes through conditions and return a value when the first condition is met.