Yes, you can select the other fields from the row with the maximum create_date using a subquery. Here is an example of how you can do it:

SELECT *
FROM erp_pdd_owe_goods_management_operate_log
WHERE create_date = (
    SELECT MAX(create_date)
    FROM erp_pdd_owe_goods_management_operate_log
    WHERE skc = :skc
    AND color = :color
    AND store = :store
    AND parent_sku = :parentSku
)

This query will retrieve all the fields from the row with the maximum create_date that matches the specified conditions.

select after_edit_valuemaxcreate_date from erp_pdd_owe_goods_management_operate_log +						 where skc =skc and color =color and store =store and parent_sku =parentSku 能查到最大的create_date对应行的的其字段吗

原文地址: https://www.cveoy.top/t/topic/jeP5 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录