SELECT
warehouse_id,
amount,
store_type,
position,
main_destination_id,
pickup_destinations_ids,
shipping_destinations_ids,
status,
wpa.product_id as product_id
FROM
netting_store_locations AS sl
INNER JOIN netting_warehouses_products_amount AS wpa ON wpa.warehouse_id = sl.store_location_id
WHERE
wpa.product_id IN (537)
ORDER BY
sl.position ASC