我确实加入了三张桌子。
arel = OfferOrder.includes(:a,:b,:c) arel = arel.select('(CASE WHEN ISNULL(c.field2)那么c.field1 ELSE c.field2 END)AS欺诈')
但是当我运行我的代码时,它会给出错误
(Mysql2::Error: 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 'AS fraud)
我哪里出错?