Why do you use a subquery? it is clear that the field in the database has a value, but it is empty.

what is the cause of this situation, and how to solve
SELECT

o.order_id,
o.send_goods_status send_goods_status,

FROM

(
    SELECT
        o.order_id,
        mi.STATUS send_goods_status,
    FROM
        ypb_order_info o
    LEFT JOIN ypb_order_merchandiser_mission_info mi ON o.order_id = mi.order_id
    AND mi.create_time = (
        SELECT
            MAX(create_time)
        FROM
            ypb_order_merchandiser_mission_info
        GROUP BY
            id
        ORDER BY
            create_time DESC
        LIMIT 1
    )
) o

GROUP BY

o.order_id

ORDER BY

o.create_time DESC

send_goods_status is empty, but I checked that the table has data.
my goal is to find out that each order in the ypb_order_merchandiser_mission_info table corresponds to multiple items, but I only take the latest one

Mar.13,2021

post the SQL.

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1be5c5c-3179e.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1be5c5c-3179e.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?