Advertisement
Guest User

Untitled

a guest
Jun 27th, 2017
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.34 KB | None | 0 0
  1. select cped.entity_id as `Product ID`,
  2. cpe.type_id as `Type`,
  3. cpe.sku,
  4. cped.store_id as `Store ID`,
  5. cped.value as `Special price`
  6. ,cped_price.value as `Price`
  7. ,cpev_style.value as `Style`
  8. ,cpei_status.value as `Status`
  9. ,cpedate_from.value as `Special from`
  10. ,cpedate_to.value as `Special to`
  11.  
  12. from catalog_product_entity_decimal as cped
  13. left join catalog_product_entity as cpe on cped.entity_id=cpe.entity_id
  14. left join catalog_product_entity_decimal as cped_price on cped.entity_id=cped_price.entity_id
  15. and cped.store_id=cped_price.store_id
  16. and cped_price.attribute_id=60
  17.  
  18. left join catalog_product_entity_varchar as cpev_style on cped.entity_id=cpev_style.entity_id
  19. and cped.store_id=cpev_style.store_id
  20. and cpev_style.attribute_id=547
  21.  
  22. left join catalog_product_entity_int as cpei_status on cped.entity_id=cpei_status.entity_id
  23. and cped.store_id=cpei_status.store_id
  24. and cpei_status.attribute_id=80
  25.  
  26. left join catalog_product_entity_datetime as cpedate_from on cped.entity_id=cpedate_from.entity_id
  27. and cped.store_id=cpedate_from.store_id
  28. and cpedate_from.attribute_id=62
  29.  
  30. left join catalog_product_entity_datetime as cpedate_to on cped.entity_id=cpedate_to.entity_id
  31. and cped.store_id=cpedate_to.store_id
  32. and cpedate_to.attribute_id=63
  33.  
  34. where cped.attribute_id=61
  35. and cped.value is not null
  36.  
  37. order by cped.entity_id
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement