I've read the following code a few times trying to figure out what it is doing.
"A right outer join is that which returns the unmatched rows from the right tables with matched rows from the left table."
Ok, but the column
"item_cnt" does not exist in the tables, then what column is it serving as an alias? I'm preparing for 1z0-047 so any help would be appreciated.
You executed the following query to display
PRODUCT_NAME and the number of times the product has been ordered:
SELECT p.product_name, i.item_cnt FROM (SELECT product_id, COUNT (*) item_cnt FROM order_items GROUP BY product_id) i RIGHT OUTER JOIN products p ON i.product_id = p.product_id;
I thought that the column should exist. But here is the Oracle docs page with all example schemas. If I search with ctrl+f for
item_cnt, I find nothing: Oracle example schemas.