How do I add an alias to the table SELECT MAX(COUNT), A.id FROM
(
    SELECT supplier_id as id, COUNT(*) AS count
    FROM `library`.`lms_book_details`
    GROUP BY supplier_id
) GROUP BY A.id;


While executing the query, MySQL gives an error:


  Every Derived table must have its own alias. 


How do I add an alias to this?
Try like

SELECT MAX(A.count_supplier), A.id FROM
(
    SELECT supplier_id as id, COUNT(*) AS count_supplier
    FROM library.lms_book_details
    GROUP BY supplier_id
) A GROUP BY A.id;


Alias inner COUNT(*) as something different than COUNT as it is good practice to not use it as alias , As i have used count_supplier.