I am trying to use the distinct clause to add these two values together, but when I do it still gives me two separate rows. Ultimately I want to add these two rows together.
A screenshot of the table view from my query
Basically this is a database that keeps track of books, pages, quantity, price, etc. I'm trying to find the total value of books that fit a certain genre (nonfiction), and are over a certain price threshold. I then multiply these two together to get the value.
There's two records in my database that fit this description, and it is displaying the individual values for both of these records
SELECT DISTINCT Sum([Price]*[Quantity]) AS Total_Value
FROM Merchandise INNER JOIN Book ON Merchandise.MerchID = Book.ISBN
GROUP BY Book.Genre, Merchandise.Price, Merchandise.Quantity
HAVING (((Book.Genre)="Nonfiction") AND ((Merchandise.Price)>18));