According to my understanding, GROUP BY would return 2 tuples.
MODEL ITEM_TYPE PRICE
---------------------------- ------------------------------------- ----------
010-99-0101 BACKPACK 5329.1
626-21-1500 BACKPACK 1485.86
The value of average price is,
AVG(PRICE)
----------
4858.014444
So, The following query should filter out the smaller value of price.
SELECT item_type, MODEL, items.price
FROM ITEMS
WHERE MANUFACTURER_NAME = 'UWZ'
AND ITEM_TYPE = 'BACKPACK'
GROUP BY item_type, items.price, MODEL
HAVING ITEMS.PRICE > AVG(ITEMS.PRICE);
So, the output should be:
MODEL ITEM_TYPE PRICE
---------------------------- ------------------------------------- ----------
010-99-0101 BACKPACK 5329.1
But, in reality, the following is the output:
Output
no rows selected