I need to create a table in mysql workbench and have some column process a mathematical operation, so the problem is that the table processes well until the mathematical operation which starts withSELECT ID, Price, Maintenance_Percentage... I do not know how to overcome this problem here is the table below:
USE test;
CREATE TABLE test1 (
Price double,
High_Specs varchar(80),
Unit_total_Price_with_8_years_Finishing double,
Maintenance_Percentage int
AS
(case
when Project="New York"
then 10
when Project="Boston"
then 8
when Project="Florida"
then 8
when Project="Washignton"
then 8
else 0
end),
SELECT ID, Price, Maintenance_Percentage, Price * Maintenance_Percentage) /100, as Maintenance_Value, from test1,
Payment_terms varchar(80) );