Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- SELECT
- `at_status`.`value` AS `status`,
- `at_visibility`.`value` AS `visibility`,
- `at_thumbnail`.`value` AS `thumbnail`,
- `at_short_description`.`value` AS `short_description`,
- `at_cost`.`value` AS `cost`,
- `at_manufacturer`.`value` AS `manufacturer`,
- `at_selector`.`value` AS `selector`,
- `at_tojstorrelse`.`value` AS `tojstorrelse`,
- `at_ean`.`value` AS `ean`,
- `at_pakken_indeholder`.`value` AS `pakken_indeholder`,
- `at_stockstatus`.`value` AS `stockstatus`,
- `at_gruppe`.`value` AS `gruppe`,
- `at_size_other`.`value` AS `size_other`,
- GROUP_CONCAT(DISTINCT (upsell_e.sku)
- SEPARATOR ', ') AS `upsell_skus`,`upsell_e`.`sku` AS `upsell_sku`,
- GROUP_CONCAT(DISTINCT (cross_e.sku)
- SEPARATOR ', ') AS `cross_skus`,
- `cross_e`.`sku` AS `cross_sku`,
- `cataloginventory_stock_item`.`qty` AS `stock_qty`,
- `cataloginventory_stock_item`.`is_in_stock`,
- `cataloginventory_stock_status`.`vendor_qty_1`,
- `cataloginventory_stock_status`.`vendor_qty_2`,
- `cataloginventory_stock_status`.`vendor_qty_3`,
- `cataloginventory_stock_status`.`vendor_qty_4`,
- `cataloginventory_stock_status`.`vendor_qty_5`,
- `cataloginventory_stock_status`.`vendor_qty_6`,
- `cataloginventory_stock_status`.`vendor_qty_7`,
- `cataloginventory_stock_status`.`vendor_qty_8`,
- `cataloginventory_stock_status`.`vendor_qty_9`,
- `cataloginventory_stock_status`.`vendor_qty_10`,
- `cataloginventory_stock_status`.`vendor_qty_11`,
- `cataloginventory_stock_status`.`vendor_qty_12`,
- `cataloginventory_stock_status`.`vendor_qty_13`,
- `cataloginventory_stock_status`.`vendor_qty_14`,
- `cataloginventory_stock_status`.`vendor_qty_16`,
- `cataloginventory_stock_status`.`vendor_qty_17`,
- `cataloginventory_stock_status`.`vendor_qty_18`,
- `cataloginventory_stock_status`.`vendor_qty_19`,
- `cataloginventory_stock_status`.`vendor_qty_20`,
- `cataloginventory_stock_status`.`vendor_qty_21`,
- `cataloginventory_stock_status`.`vendor_qty_22`,
- `cataloginventory_stock_status`.`vendor_qty_23`,
- `cataloginventory_stock_status`.`vendor_qty_24`,
- `cataloginventory_stock_status`.`vendor_qty_25`,
- `cataloginventory_stock_status`.`vendor_qty_26`,
- `cataloginventory_stock_status`.`vendor_qty_27`,
- `cataloginventory_stock_status`.`vendor_qty_28`,
- `cataloginventory_stock_status`.`vendor_qty_29`,
- `cataloginventory_stock_status`.`vendor_qty_30`,
- `cataloginventory_stock_status`.`vendor_qty_31`,
- `cataloginventory_stock_status`.`vendor_qty_32`,
- `cataloginventory_stock_status`.`vendor_qty_33`,
- `e`.`entity_id`
- FROM
- `catalog_product_entity` AS `e`
- INNER JOIN `catalog_product_entity_int` AS `at_status` ON (`at_status`.`entity_id` = `e`.`entity_id`)
- AND (`at_status`.`attribute_id` = '84')
- AND (`at_status`.`store_id` = 0)
- INNER JOIN `catalog_product_entity_int` AS `at_visibility` ON (`at_visibility`.`entity_id` = `e`.`entity_id`)
- AND (`at_visibility`.`attribute_id` = '91')
- AND (`at_visibility`.`store_id` = 0)
- LEFT JOIN `catalog_product_entity_varchar` AS `at_thumbnail` ON (`at_thumbnail`.`entity_id` = `e`.`entity_id`)
- AND (`at_thumbnail`.`attribute_id` = '76')
- AND (`at_thumbnail`.`store_id` = 0)
- LEFT JOIN `catalog_product_entity_text` AS `at_short_description` ON (`at_short_description`.`entity_id` = `e`.`entity_id`)
- AND (`at_short_description`.`attribute_id` = '62')
- AND (`at_short_description`.`store_id` = 0)
- LEFT JOIN `catalog_product_entity_decimal` AS `at_cost` ON (`at_cost`.`entity_id` = `e`.`entity_id`)
- AND (`at_cost`.`attribute_id` = '68')
- AND (`at_cost`.`store_id` = 0)
- LEFT JOIN `catalog_product_entity_int` AS `at_manufacturer` ON (`at_manufacturer`.`entity_id` = `e`.`entity_id`)
- AND (`at_manufacturer`.`attribute_id` = '70')
- AND (`at_manufacturer`.`store_id` = 0)
- LEFT JOIN `catalog_product_entity_varchar` AS `at_selector` ON (`at_selector`.`entity_id` = `e`.`entity_id`)
- AND (`at_selector`.`attribute_id` = '145')
- AND (`at_selector`.`store_id` = 0)
- LEFT JOIN `catalog_product_entity_int` AS `at_tojstorrelse` ON (`at_tojstorrelse`.`entity_id` = `e`.`entity_id`)
- AND (`at_tojstorrelse`.`attribute_id` = '148')
- AND (`at_tojstorrelse`.`store_id` = 0)
- LEFT JOIN `catalog_product_entity_varchar` AS `at_ean` ON (`at_ean`.`entity_id` = `e`.`entity_id`)
- AND (`at_ean`.`attribute_id` = '231')
- AND (`at_ean`.`store_id` = 0)
- LEFT JOIN `catalog_product_entity_varchar` AS `at_pakken_indeholder` ON (`at_pakken_indeholder`.`entity_id` = `e`.`entity_id`)
- AND (`at_pakken_indeholder`.`attribute_id` = '263')
- AND (`at_pakken_indeholder`.`store_id` = 0)
- LEFT JOIN `catalog_product_entity_int` AS `at_stockstatus` ON (`at_stockstatus`.`entity_id` = `e`.`entity_id`)
- AND (`at_stockstatus`.`attribute_id` = '344')
- AND (`at_stockstatus`.`store_id` = 0)
- LEFT JOIN `catalog_product_entity_int` AS `at_gruppe` ON (`at_gruppe`.`entity_id` = `e`.`entity_id`)
- AND (`at_gruppe`.`attribute_id` = '358')
- AND (`at_gruppe`.`store_id` = 0)
- LEFT JOIN `catalog_product_entity_varchar` AS `at_size_other` ON (`at_size_other`.`entity_id` = `e`.`entity_id`)
- AND (`at_size_other`.`attribute_id` = '395')
- AND (`at_size_other`.`store_id` = 0)
- LEFT JOIN `catalog_product_link` AS `upsell_link` ON upsell_link.product_id = e.entity_id
- AND upsell_link.link_type_id = 4
- LEFT JOIN `catalog_product_entity` AS `upsell_e` ON upsell_e.entity_id = upsell_link.linked_product_id
- LEFT JOIN `catalog_product_link` AS `cross_link` ON cross_link.product_id = e.entity_id
- AND cross_link.link_type_id = 5
- LEFT JOIN `catalog_product_entity` AS `cross_e` ON cross_e.entity_id = cross_link.linked_product_id
- LEFT JOIN `cataloginventory_stock_item` ON (cataloginventory_stock_item.product_id = e.entity_id)
- AND (cataloginventory_stock_item.stock_id = 1)
- LEFT JOIN `cataloginventory_stock_status` ON (cataloginventory_stock_status.product_id = e.entity_id)
- AND (cataloginventory_stock_status.website_id = 1
- AND cataloginventory_stock_status.stock_id = 1)
- GROUP BY `e`.`entity_id`
- order by e.entity_id asc
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement