SELECT
warehouse_id,
amount,
store_type,
position,
main_destination_id,
pickup_destinations_ids,
shipping_destinations_ids,
status
FROM
cscart_store_locations AS sl
INNER JOIN cscart_warehouses_products_amount AS wpa ON wpa.warehouse_id = sl.store_location_id
WHERE
wpa.product_id = 368
ORDER BY
sl.position ASC