Laravel CTE (WITH) query builder for union all
I'm using Laravel package staudenmeir/laravel-cte but am not able to articulate the query I want MY SQL query : WITH T AS ( SELECT Id, DeviceType, DeviceId, ENERGY_Total, `Time` FROM devices_sensor_data WHERE `Time` BETWEEN '2023-03-28 00:00:00' AND '2023-03-27 20:40:00' AND…