Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- select a.id adjustmentid, a.created_at adjustmentCreatedAt, b.id orderid, CONCAT(b.date, " ", b.time) orderDateTime, DATEDIFF(a.created_at, CONCAT(b.date, " ", b.time)) daysToCreateAdjustment from hd_rental_service_adjustment a
- inner join hd_rental_service b on a.hd_rental_service_id = b.id
- where a.id not in (
- select hd_rental_service_adjustment_id from driver_balance where hd_rental_service_adjustment_id is not null
- )
- and a.driver_amount is not null
- and b.status not in (0, 1, 5)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement