Query problem no product name I have a query for a custom opencart store and I am doing something wrong with the LEFT join as because of the subquery on some products I am loosing the Product Name. I am not sure why. Any suggestions?

SELECT 
    w0.name AS 'Product Name',
    p.sku AS 'Product(sku)',
    p.product_id AS 'product_id',
    p.parent_id AS 'parent_id',
    COALESCE(w0.quantity, 0) AS 'Denmark - main'
FROM
    oc_product p
        LEFT JOIN
    oc_warehouse_product wp ON (p.product_id = wp.product_id)
        LEFT JOIN
    oc_warehouse_locations wl ON (wp.warehouse_id = wl.warehouse_id)
        LEFT JOIN
    (SELECT 
        pd.name, wp.quantity, p.sku
    FROM
        oc_product p
    LEFT JOIN oc_warehouse_product wp ON (p.product_id = wp.product_id)
    INNER JOIN oc_warehouse_locations wl ON (wp.warehouse_id = wl.warehouse_id)
    LEFT JOIN oc_product_description pd ON (p.product_id = pd.product_id)
    WHERE
        wl.warehouse_name = 'Denmark - main') AS w0 ON p.sku = w0.sku
GROUP BY p.sku
ORDER BY 'Product Name'
LIMIT 0 , 20
Rick James was right the problem was the left join that did not worked there. I replaced it with an INNER join and it works perfect.

The final query working and optimised looks like this:

SELECT 
    w0.name AS 'Product Name',
    p.sku AS 'Product(sku)',
    p.product_id AS 'product_id',
    p.parent_id AS 'parent_id',
    COALESCE(w0.quantity, 0) AS 'Denmark - main'
FROM
    (SELECT 
        *
    FROM
        oc_product p
    ORDER BY 'Product Name'
    LIMIT 0 , 20) p
        LEFT JOIN
    oc_warehouse_product wp ON (p.product_id = wp.product_id)
        INNER JOIN
    oc_warehouse_locations wl ON (wp.warehouse_id = wl.warehouse_id)
        LEFT JOIN
    (SELECT 
        pd.name, wp.quantity, p.sku
    FROM
        oc_product p
    LEFT JOIN oc_warehouse_product wp ON (p.product_id = wp.product_id)
    INNER JOIN oc_warehouse_locations wl ON (wp.warehouse_id = wl.warehouse_id)
    LEFT JOIN oc_product_description pd ON (p.product_id = pd.product_id)
    WHERE
        wl.warehouse_name = 'Denmark - main') AS w0 ON p.sku = w0.sku
GROUP BY p.sku
ORDER BY 'Product Name'
LIMIT 0 , 20;