Larave where 不能加mysql 函数问题?

DB::table('wn_devicedata')->select(DB::raw('round(avg(D2) / 100) AS inputV, round(avg(D6) / 100) AS inputPower, round(avg(D7) / 100) AS systemLoad, round(avg(D8) / 100) AS backupTime'))->where('date_add(DataTime, INTERVAL 2 MINUTE)','>','> NOW() ')->groupBy('DataTime')->get();

SQL: select round(avg(D2) / 100) AS inputV, round(avg(D6) / 100) AS inputPower, round(avg(D7) / 100) AS systemLoad, round(avg(D8) / 100) AS backupTime from
wn_devicedata
where
date_add(DataTime, INTERVAL 2 MINUTE) > NOW()
is null group by
DataTime

不能使用mysql 函数?
where() 条件是:第一个字段默认会 加 where(
DataTime
);

麻烦哪位大神解救下?
已邀请:

[已注销]

赞同来自:

whereRaw()

要回复问题请先登录注册