I am trying to use COUNT to well count the number of times a product has been ordered.
Below is what I have,which is not working out. I get the error
SQL Error: ORA-00937: not a single-group group function
When I try to use the Group by function it said it's not a GROUP by function or that it cannot be used.
CREATE OR REPLACE VIEW product_summary AS
SELECT product_name, COUNT(*) AS order_count, item_total AS order_total
FROM order_item_products