SELECT SUM(order_items.qty_ordered) AS `ordered_qty`, `order_items`.`name` AS `order_items_name`, `order_items`.`product_id` AS `entity_id`, `e`.`entity_type_id`, `e`.`attribute_set_id`, `e`.`type_id`, `e`.`sku`, `e`.`has_options`, `e`.`required_options`, `e`.`created_at`, `e`.`updated_at`, `e`.`name`, `e`.`price`, `e`.`thumbnail`, `e`.`short_description`, `e`.`small_image`, `e`.`url_key`, `e`.`status`, `cat_index`.`position` AS `cat_index_position` FROM `mg_sales_flat_order_item` AS `order_items`
 INNER JOIN `mg_sales_flat_order` AS `order` ON `order`.entity_id = order_items.order_id AND `order`.state <> 'canceled'
 LEFT JOIN `mg_catalog_product_entity` AS `e` ON (e.type_id NOT IN ('grouped', 'configurable', 'bundle')) AND e.entity_id = order_items.product_id AND e.entity_type_id = 4
 INNER JOIN `mg_catalog_category_product_index` AS `cat_index` ON cat_index.product_id=e.entity_id AND cat_index.store_id='7' AND cat_index.visibility IN(2, 4) AND cat_index.category_id = '2' WHERE (parent_item_id IS NULL) AND (e.status = '1') GROUP BY `order_items`.`product_id` HAVING (SUM(order_items.qty_ordered) > 0) ORDER BY `ordered_qty` desc

SQLSTATE[42S22]: Column not found: 1054 Unknown column 'e.name' in 'field list', query was: SELECT SUM(order_items.qty_ordered) AS `ordered_qty`, `order_items`.`name` AS `order_items_name`, `order_items`.`product_id` AS `entity_id`, `e`.`entity_type_id`, `e`.`attribute_set_id`, `e`.`type_id`, `e`.`sku`, `e`.`has_options`, `e`.`required_options`, `e`.`created_at`, `e`.`updated_at`, `e`.`name`, `e`.`price`, `e`.`thumbnail`, `e`.`short_description`, `e`.`small_image`, `e`.`url_key`, `e`.`status`, `cat_index`.`position` AS `cat_index_position` FROM `mg_sales_flat_order_item` AS `order_items`
 INNER JOIN `mg_sales_flat_order` AS `order` ON `order`.entity_id = order_items.order_id AND `order`.state <> 'canceled'
 LEFT JOIN `mg_catalog_product_entity` AS `e` ON (e.type_id NOT IN ('grouped', 'configurable', 'bundle')) AND e.entity_id = order_items.product_id AND e.entity_type_id = 4
 INNER JOIN `mg_catalog_category_product_index` AS `cat_index` ON cat_index.product_id=e.entity_id AND cat_index.store_id='7' AND cat_index.visibility IN(2, 4) AND cat_index.category_id = '2' WHERE (parent_item_id IS NULL) AND (e.status = '1') GROUP BY `order_items`.`product_id` HAVING (SUM(order_items.qty_ordered) > 0) ORDER BY `ordered_qty` desc

#0 /home/paparyw/public_html/lib/Varien/Db/Statement/Pdo/Mysql.php(110): Zend_Db_Statement_Pdo->_execute(Array)
#1 /home/paparyw/public_html/app/code/core/Zend/Db/Statement.php(291): Varien_Db_Statement_Pdo_Mysql->_execute(Array)
#2 /home/paparyw/public_html/lib/Zend/Db/Adapter/Abstract.php(480): Zend_Db_Statement->execute(Array)
#3 /home/paparyw/public_html/lib/Zend/Db/Adapter/Pdo/Abstract.php(238): Zend_Db_Adapter_Abstract->query('SELECT SUM(orde...', Array)
#4 /home/paparyw/public_html/lib/Varien/Db/Adapter/Pdo/Mysql.php(504): Zend_Db_Adapter_Pdo_Abstract->query('SELECT SUM(orde...', Array)
#5 /home/paparyw/public_html/lib/Zend/Db/Adapter/Abstract.php(737): Varien_Db_Adapter_Pdo_Mysql->query('SELECT SUM(orde...', Array)
#6 /home/paparyw/public_html/lib/Varien/Data/Collection/Db.php(734): Zend_Db_Adapter_Abstract->fetchAll('SELECT SUM(orde...', Array)
#7 /home/paparyw/public_html/app/code/core/Mage/Eav/Model/Entity/Collection/Abstract.php(1045): Varien_Data_Collection_Db->_fetchAll('SELECT SUM(orde...')
#8 /home/paparyw/public_html/app/code/core/Mage/Eav/Model/Entity/Collection/Abstract.php(871): Mage_Eav_Model_Entity_Collection_Abstract->_loadEntities(false, false)
#9 /home/paparyw/public_html/lib/Varien/Data/Collection.php(741): Mage_Eav_Model_Entity_Collection_Abstract->load()
#10 /home/paparyw/public_html/app/code/local/Megnor/Bestseller/Block/Bestsellerlist.php(37): Varien_Data_Collection->getIterator()
#11 /home/paparyw/public_html/app/code/core/Mage/Core/Block/Abstract.php(293): Megnor_Bestseller_Block_Bestsellerlist->_prepareLayout()
#12 /home/paparyw/public_html/app/code/core/Mage/Core/Model/Layout.php(456): Mage_Core_Block_Abstract->setLayout(Object(Mage_Core_Model_Layout))
#13 /home/paparyw/public_html/app/code/core/Mage/Core/Model/Layout.php(472): Mage_Core_Model_Layout->createBlock('bestseller/best...', 'bestseller_prod...')
#14 /home/paparyw/public_html/app/code/core/Mage/Core/Model/Layout.php(239): Mage_Core_Model_Layout->addBlock('bestseller/best...', 'bestseller_prod...')
#15 /home/paparyw/public_html/app/code/core/Mage/Core/Model/Layout.php(205): Mage_Core_Model_Layout->_generateBlock(Object(Mage_Core_Model_Layout_Element), Object(Mage_Core_Model_Layout_Element))
#16 /home/paparyw/public_html/app/code/core/Mage/Core/Model/Layout.php(210): Mage_Core_Model_Layout->generateBlocks(Object(Mage_Core_Model_Layout_Element))
#17 /home/paparyw/public_html/app/code/core/Mage/Core/Controller/Varien/Action.php(344): Mage_Core_Model_Layout->generateBlocks()
#18 /home/paparyw/public_html/app/code/core/Mage/Core/Controller/Varien/Action.php(269): Mage_Core_Controller_Varien_Action->generateLayoutBlocks()
#19 /home/paparyw/public_html/app/code/local/Megnor/Bestseller/controllers/IndexController.php(23): Mage_Core_Controller_Varien_Action->loadLayout()
#20 /home/paparyw/public_html/app/code/core/Mage/Core/Controller/Varien/Action.php(418): Megnor_Bestseller_IndexController->indexAction()
#21 /home/paparyw/public_html/app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(254): Mage_Core_Controller_Varien_Action->dispatch('index')
#22 /home/paparyw/public_html/app/code/core/Mage/Core/Controller/Varien/Front.php(172): Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller_Request_Http))
#23 /home/paparyw/public_html/app/code/core/Mage/Core/Model/App.php(365): Mage_Core_Controller_Varien_Front->dispatch()
#24 /home/paparyw/public_html/app/Mage.php(683): Mage_Core_Model_App->run(Array)
#25 /home/paparyw/public_html/index.php(85): Mage::run('', 'store')
#26 {main}