MySQL Query不会执行

时间:2017-06-23 09:26:41

标签: mysql performance

此MySQL查询不会提供任何输出,而是转到下面附带的屏幕:

SELECT sfog.entity_id, 
  sfog.status AS Status,
  CONCAT(
    (SELECT customer_entity_varchar.value 
       from customer_entity_varchar  
       where attribute_id = '5' 
       AND customer_entity_varchar.entity_id = ms.mageproownerid  
    ),' ', 
    (SELECT customer_entity_varchar.value 
     from customer_entity_varchar 
     where attribute_id = '7' 
       AND customer_entity_varchar.entity_id = ms.mageproownerid 
    )
 ) AS Seller , 
 sfog.increment_id AS OrderNo , 
 sfosh.created_at AS 'Invoice Date', 
 mo.tracking_number AS 'Tracking Number', 
 CONCAT(sfoa.firstname, ' ', sfoa.lastname) AS 'Customer Name' 
from sales_flat_order_grid sfog, 
  sales_flat_order_address sfoa, 
  marketplace_saleslist ms, 
  customer_entity_varchar cev, 
  sales_flat_order_status_history sfosh, 
  marketplace_orders mo 
where sfog.status = 'delivered' 
  AND sfoa.parent_id = sfog.entity_id 
  AND ms.mageorderid = sfog.entity_id 
  AND cev.entity_id = ms.mageproownerid 
  AND sfosh.parent_id = sfog.entity_id 
  AND sfosh.entity_name = 'invoice' 
  AND mo.order_id = sfog.entity_id 
GROUP BY sfog.entity_id

ScreenShot of How Query Ends

0 个答案:

没有答案