I fixed the publisher id =2 after i posted. sorry.
SELECT SUM(ILI.QUANTITY_SOLD)
FROM INVOICE I
JOIN INVOICE_LINE_ITEM ILI ON ILI.INVOICE_ID=I.INVOICE_ID
JOIN BOOK B ON B.ISBN=B.ISBN
JOIN PUBLISHER P ON P.PUBLISHER_ID=P.PUBLISHER_ID
WHERE P.PUBLISHER_ID=2 AND INVOICE_DATE='2011-1-16'
So I am working on invoice.
Invoice has Invoice_ID and invoice_date.
Inovice Line Item has invoice ID, ISBN and Quantity sold.
Book has ISBN, TITLE, Subject ID, publisher ID, year published and price.
Publisher has publisher ID and Publisher name.
So I revamped it and this is where I am now.
SELECT SUM(ILI.QUANTITY_SOLD)
FROM INVOICE I
JOIN INVOICE_LINE_ITEM ILI ON ILI.INVOICE_ID=I.INVOICE_ID
JOIN BOOK B ON B.ISBN=B.ISBN
WHERE B.PUBLISHER_ID=2 AND INVOICE_DATE='2011-1-16'
Since I am working on invoice, and the quantity sold on invoice line item, I joined invoice line item in line 3. Also, since I need the publisher, I got that from book since book shares the isbn with invoice line item and also contains the publisher id. But do i need to link publisher since publisher ID is a foreign key to book?