I was running updates in Magento connect manager, and something went wrong.
When trying to log on to the backend we are faced with the below error. Any ideas on how to fix this?
SQLSTATE[42S22]: Column not found: 1054 Unknown column 'sales_bestsellers_aggregated_yearly.product_type_id' in 'field list', query was: SELECT COUNT(*) FROM (SELECT MAX(DATE_FORMAT(period, '%Y-%m-%d')) AS `period`, SUM(qty_ordered) AS `qty_ordered`, `sales_bestsellers_aggregated_yearly`.`product_id`, MAX(product_name) AS `product_name`, MAX(product_price) AS `product_price`, `sales_bestsellers_aggregated_yearly`.`product_type_id` FROM `sales_bestsellers_aggregated_yearly` WHERE (EXISTS (SELECT 1 FROM `catalog_product_entity` AS `existed_products` WHERE (sales_bestsellers_aggregated_yearly.product_id = existed_products.entity_id))) AND (store_id IN(0)) GROUP BY `product_id` LIMIT 5) AS `t`
Looks like you have - product_type_id column is not there in sales_bestsellers_aggregated_yearly table into your database !
so exactly you need to identify from where this - product_type_id field is coming because its not there in native table db !!
so either you need to delete this column or need to identify and share from where its added
Hope it helps !!