Does MySQL support full joins now; can't remember the last time I needed one, but MySQL didn't do it at the time?
Apr 14, 2016
6
Level 1
How to do full join?
SELECT
dl.date,
operators.id,
IFNULL(SEC_TO_TIME(SUM(TIME_TO_SEC(TIMEDIFF(oop.end_time, oop.login_time)))), '00:00:00')
FROM date_list AS dl
JOIN operators <----------------------------------THIS LINE --------------------------
LEFT JOIN operator_online_period AS oop ON date(oop.login_time) = dl.date AND oop.operator_id = operators.id
WHERE dl.date BETWEEN '2016-04-01' AND '2016-04-15'
AND operators.id IN (1, 2, 17)
GROUP BY dl.date, operators.id
ORDER BY dl.date, operators.id
How can I made this? According to "compileJoins" function in Illuminate\Database\Query\Grammars\Grammar.php line 149, this can't be done. This function think what at least one of clause must exist.
I can make patch & commit. Or where is a way to do it clean(without DB::select)?
Please or to participate in this conversation.