query to display the book code, publication, price and supplier name of the book which is taken frequently
query to display the book code, publication, price and supplier name of the book which is taken frequently.
The above question I used this query but it return error.
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
the query explanation is: table1: book_issue table2: book_details table3: supplieer_details
the above query purpose is want to display frequently taken book. I tried but having some.
How to correct the sql statement?
query to display the book code, publication, price and supplier name of the book which is taken frequently.
The above question I used this query but it return error.
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
the query explanation is: table1: book_issue table2: book_details table3: supplieer_details
the above query purpose is want to display frequently taken book. I tried but having some.
How to correct the sql statement?
No comments:
Post a Comment