SQL Query Error
(SELECT COUNT(queue.ref_item) as item_count, item.*, item_type.action as type_action, 
                       if (item_serie.id is not null, item_serie.name, item.name) AS item_name,
                       CONCAT('http://www.hmongflix.com/materials/items/', LEFT(item.id, 1), '/', item.id, '/thumbnail', '.jpg') AS thumbnail_image_file_src, if (item.ref_item_serie, item.ref_item_serie, -1*item.id) as group_by_serie
                FROM queues AS queue
                INNER JOIN items AS item ON queue.ref_item = item.id
                INNER JOIN item_formats AS item_format ON item.ref_format = item_format.id 
                INNER JOIN item_types AS item_type ON item.ref_type = item_type.id
                INNER JOIN videos AS video ON item.id = video.ref_item 
                LEFT JOIN item_series AS item_serie ON (item_serie.id = item.ref_item_serie)
                 WHERE 1  AND NOT queue.deleted  AND item.ref_status = '1' GROUP BY group_by_serie ORDER BY item_count DESC LIMIT 24)
Got error 122 from storage engine