Advertisement
Guest User

Untitled

a guest
Oct 23rd, 2018
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.70 KB | None | 0 0
  1. SELECT
  2. `at_status`.`value` AS `status`,
  3. `at_visibility`.`value` AS `visibility`,
  4. `at_thumbnail`.`value` AS `thumbnail`,
  5. `at_short_description`.`value` AS `short_description`,
  6. `at_cost`.`value` AS `cost`,
  7. `at_manufacturer`.`value` AS `manufacturer`,
  8. `at_selector`.`value` AS `selector`,
  9. `at_tojstorrelse`.`value` AS `tojstorrelse`,
  10. `at_ean`.`value` AS `ean`,
  11. `at_pakken_indeholder`.`value` AS `pakken_indeholder`,
  12. `at_stockstatus`.`value` AS `stockstatus`,
  13. `at_gruppe`.`value` AS `gruppe`,
  14. `at_size_other`.`value` AS `size_other`,
  15. GROUP_CONCAT(DISTINCT (upsell_e.sku)
  16. SEPARATOR ', ') AS `upsell_skus`,`upsell_e`.`sku` AS `upsell_sku`,
  17. GROUP_CONCAT(DISTINCT (cross_e.sku)
  18. SEPARATOR ', ') AS `cross_skus`,
  19. `cross_e`.`sku` AS `cross_sku`,
  20. `cataloginventory_stock_item`.`qty` AS `stock_qty`,
  21. `cataloginventory_stock_item`.`is_in_stock`,
  22. `cataloginventory_stock_status`.`vendor_qty_1`,
  23. `cataloginventory_stock_status`.`vendor_qty_2`,
  24. `cataloginventory_stock_status`.`vendor_qty_3`,
  25. `cataloginventory_stock_status`.`vendor_qty_4`,
  26. `cataloginventory_stock_status`.`vendor_qty_5`,
  27. `cataloginventory_stock_status`.`vendor_qty_6`,
  28. `cataloginventory_stock_status`.`vendor_qty_7`,
  29. `cataloginventory_stock_status`.`vendor_qty_8`,
  30. `cataloginventory_stock_status`.`vendor_qty_9`,
  31. `cataloginventory_stock_status`.`vendor_qty_10`,
  32. `cataloginventory_stock_status`.`vendor_qty_11`,
  33. `cataloginventory_stock_status`.`vendor_qty_12`,
  34. `cataloginventory_stock_status`.`vendor_qty_13`,
  35. `cataloginventory_stock_status`.`vendor_qty_14`,
  36. `cataloginventory_stock_status`.`vendor_qty_16`,
  37. `cataloginventory_stock_status`.`vendor_qty_17`,
  38. `cataloginventory_stock_status`.`vendor_qty_18`,
  39. `cataloginventory_stock_status`.`vendor_qty_19`,
  40. `cataloginventory_stock_status`.`vendor_qty_20`,
  41. `cataloginventory_stock_status`.`vendor_qty_21`,
  42. `cataloginventory_stock_status`.`vendor_qty_22`,
  43. `cataloginventory_stock_status`.`vendor_qty_23`,
  44. `cataloginventory_stock_status`.`vendor_qty_24`,
  45. `cataloginventory_stock_status`.`vendor_qty_25`,
  46. `cataloginventory_stock_status`.`vendor_qty_26`,
  47. `cataloginventory_stock_status`.`vendor_qty_27`,
  48. `cataloginventory_stock_status`.`vendor_qty_28`,
  49. `cataloginventory_stock_status`.`vendor_qty_29`,
  50. `cataloginventory_stock_status`.`vendor_qty_30`,
  51. `cataloginventory_stock_status`.`vendor_qty_31`,
  52. `cataloginventory_stock_status`.`vendor_qty_32`,
  53. `cataloginventory_stock_status`.`vendor_qty_33`,
  54. `e`.`entity_id`
  55. FROM
  56. `catalog_product_entity` AS `e`
  57. INNER JOIN `catalog_product_entity_int` AS `at_status` ON (`at_status`.`entity_id` = `e`.`entity_id`)
  58. AND (`at_status`.`attribute_id` = '84')
  59. AND (`at_status`.`store_id` = 0)
  60. INNER JOIN `catalog_product_entity_int` AS `at_visibility` ON (`at_visibility`.`entity_id` = `e`.`entity_id`)
  61. AND (`at_visibility`.`attribute_id` = '91')
  62. AND (`at_visibility`.`store_id` = 0)
  63. LEFT JOIN `catalog_product_entity_varchar` AS `at_thumbnail` ON (`at_thumbnail`.`entity_id` = `e`.`entity_id`)
  64. AND (`at_thumbnail`.`attribute_id` = '76')
  65. AND (`at_thumbnail`.`store_id` = 0)
  66. LEFT JOIN `catalog_product_entity_text` AS `at_short_description` ON (`at_short_description`.`entity_id` = `e`.`entity_id`)
  67. AND (`at_short_description`.`attribute_id` = '62')
  68. AND (`at_short_description`.`store_id` = 0)
  69. LEFT JOIN `catalog_product_entity_decimal` AS `at_cost` ON (`at_cost`.`entity_id` = `e`.`entity_id`)
  70. AND (`at_cost`.`attribute_id` = '68')
  71. AND (`at_cost`.`store_id` = 0)
  72. LEFT JOIN `catalog_product_entity_int` AS `at_manufacturer` ON (`at_manufacturer`.`entity_id` = `e`.`entity_id`)
  73. AND (`at_manufacturer`.`attribute_id` = '70')
  74. AND (`at_manufacturer`.`store_id` = 0)
  75. LEFT JOIN `catalog_product_entity_varchar` AS `at_selector` ON (`at_selector`.`entity_id` = `e`.`entity_id`)
  76. AND (`at_selector`.`attribute_id` = '145')
  77. AND (`at_selector`.`store_id` = 0)
  78. LEFT JOIN `catalog_product_entity_int` AS `at_tojstorrelse` ON (`at_tojstorrelse`.`entity_id` = `e`.`entity_id`)
  79. AND (`at_tojstorrelse`.`attribute_id` = '148')
  80. AND (`at_tojstorrelse`.`store_id` = 0)
  81. LEFT JOIN `catalog_product_entity_varchar` AS `at_ean` ON (`at_ean`.`entity_id` = `e`.`entity_id`)
  82. AND (`at_ean`.`attribute_id` = '231')
  83. AND (`at_ean`.`store_id` = 0)
  84. LEFT JOIN `catalog_product_entity_varchar` AS `at_pakken_indeholder` ON (`at_pakken_indeholder`.`entity_id` = `e`.`entity_id`)
  85. AND (`at_pakken_indeholder`.`attribute_id` = '263')
  86. AND (`at_pakken_indeholder`.`store_id` = 0)
  87. LEFT JOIN `catalog_product_entity_int` AS `at_stockstatus` ON (`at_stockstatus`.`entity_id` = `e`.`entity_id`)
  88. AND (`at_stockstatus`.`attribute_id` = '344')
  89. AND (`at_stockstatus`.`store_id` = 0)
  90. LEFT JOIN `catalog_product_entity_int` AS `at_gruppe` ON (`at_gruppe`.`entity_id` = `e`.`entity_id`)
  91. AND (`at_gruppe`.`attribute_id` = '358')
  92. AND (`at_gruppe`.`store_id` = 0)
  93. LEFT JOIN `catalog_product_entity_varchar` AS `at_size_other` ON (`at_size_other`.`entity_id` = `e`.`entity_id`)
  94. AND (`at_size_other`.`attribute_id` = '395')
  95. AND (`at_size_other`.`store_id` = 0)
  96. LEFT JOIN `catalog_product_link` AS `upsell_link` ON upsell_link.product_id = e.entity_id
  97. AND upsell_link.link_type_id = 4
  98. LEFT JOIN `catalog_product_entity` AS `upsell_e` ON upsell_e.entity_id = upsell_link.linked_product_id
  99. LEFT JOIN `catalog_product_link` AS `cross_link` ON cross_link.product_id = e.entity_id
  100. AND cross_link.link_type_id = 5
  101. LEFT JOIN `catalog_product_entity` AS `cross_e` ON cross_e.entity_id = cross_link.linked_product_id
  102. LEFT JOIN `cataloginventory_stock_item` ON (cataloginventory_stock_item.product_id = e.entity_id)
  103. AND (cataloginventory_stock_item.stock_id = 1)
  104. LEFT JOIN `cataloginventory_stock_status` ON (cataloginventory_stock_status.product_id = e.entity_id)
  105. AND (cataloginventory_stock_status.website_id = 1
  106. AND cataloginventory_stock_status.stock_id = 1)
  107. GROUP BY `e`.`entity_id`
  108. order by e.entity_id asc
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement