编写查询以显示图书代码、书名、供应商名称和图书价格,根据每个供应商取最高价格。
我发现下面的查询让我得到了正确的结果,但需要解释
select a.book_code,c.supplier_name,a.price from lms_book_details a
where a.price= (select max(price) from lms_book_details
where supplier_id= a.supplier_id )
order by book_code;
order by book_code;