GROUP BY id работает, а GROUP BY order_id вы дает ошибку
Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'express.order_status.id' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by
Вот так сделал не помогло
SET GLOBAL sql_mode=(SELECT REPLACE(@@sql_mode,'ONLY_FULL_GROUP_BY',''));
код:
SELECT
order_status.*,
orders.id AS t_order_id,
orders.user_id,
orders.track_code,
orders.weight,
orders.weight_type,
orders.price,
orders.mail_price,
orders.delivery_type,
orders.product_name,
users.id AS t_users_id,
users.full_name,
users.phone,
statuses.id AS t_status_id,
statuses.name AS status_name,
statuses.class AS status_class
FROM
order_status
LEFT JOIN
orders ON order_status.order_id = orders.id
LEFT JOIN
users ON orders.user_id = users.id
LEFT JOIN
statuses ON order_status.status_id = statuses.id
GROUP BY order_id
Заранее благодарю!