查询显示常用图书的图书编号、出版、价格和供应商名称。
上面的问题我使用了这个查询,但它返回错误。
select b1.book_code,b2.publication,b2.price,b3.supplier_name
from BOOK_ISSUE b1
join BOOK_DETAILS b2 on b1.BOOK_CODE=b2.BOOK_CODE
join SUPPLIERS_DETAILS b3 on b2.SUPPLIER_ID=b3.SUPPLIER_ID
group by b1.BOOK_CODE
having COUNT(b1.book_code)>1
查询解释为:table1: book_issue table2: book_details table3: supplieer_details
上面的查询目的是想显示经常拿的书。我试过但有一些。
如何更正sql语句?