Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- select cped.entity_id as `Product ID`,
- cpe.type_id as `Type`,
- cpe.sku,
- cped.store_id as `Store ID`,
- cped.value as `Special price`
- ,cped_price.value as `Price`
- ,cpev_style.value as `Style`
- ,cpei_status.value as `Status`
- ,cpedate_from.value as `Special from`
- ,cpedate_to.value as `Special to`
- from catalog_product_entity_decimal as cped
- left join catalog_product_entity as cpe on cped.entity_id=cpe.entity_id
- left join catalog_product_entity_decimal as cped_price on cped.entity_id=cped_price.entity_id
- and cped.store_id=cped_price.store_id
- and cped_price.attribute_id=60
- left join catalog_product_entity_varchar as cpev_style on cped.entity_id=cpev_style.entity_id
- and cped.store_id=cpev_style.store_id
- and cpev_style.attribute_id=547
- left join catalog_product_entity_int as cpei_status on cped.entity_id=cpei_status.entity_id
- and cped.store_id=cpei_status.store_id
- and cpei_status.attribute_id=80
- left join catalog_product_entity_datetime as cpedate_from on cped.entity_id=cpedate_from.entity_id
- and cped.store_id=cpedate_from.store_id
- and cpedate_from.attribute_id=62
- left join catalog_product_entity_datetime as cpedate_to on cped.entity_id=cpedate_to.entity_id
- and cped.store_id=cpedate_to.store_id
- and cpedate_to.attribute_id=63
- where cped.attribute_id=61
- and cped.value is not null
- order by cped.entity_id
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement