MySQL - 在自定义列上创建搜索

MySQL - Create Search On custom Column

我想运行一个MySQL这样的查询:

 SELECT * FROM `project` WHERE (project.sold_tons + project.recycled_tons + project.recycled_tons + project.donation_tons)*100/project.total_excess_furniture)>90

当我 运行 它时,我收到这样的错误:

#1064 - You have an error in your SQL syntax; check the manual that
corresponds to your MySQL server version for the right syntax to use
near ')>90 ORDER BY `is_archived` DESC 
LIMIT 0, 25' at line 1 

我可以吗? 要么, 是否有任何替代解决方案来创建这样的搜索?

如果不是,那么Laravel或MySQL的解决方法是什么?

感谢您的帮助..

你在

之后错过了'('

试试这个

SELECT * FROM `project` 
WHERE ((project.sold_tons + project.recycled_tons + project.recycled_tons + project.donation_tons) *100/project.total_excess_furniture) > 90

project.total_excess_furniture) <-- 这个范围是额外的