Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Microsoft Access Query 6 (2 pts) Find the models of PCs whose prices are higher

ID: 3741181 • Letter: M

Question

Microsoft Access Query 6 (2 pts)

Find the models of PCs whose prices are higher than the average price of PC models. Output a table consisting of two columns: (model, price). Sort the result by prices in ascending order.

Product maker model type A 1001 pc A 1002 pc A 1003 pc B 1004 pc B 1005 pc B 1006 pc C 1007 pc D 1008 pc D 1009 pc D 1010 pc E 1011 pc E 1012 pc E 1013 pc E 2001 laptop E 2002 laptop E 2003 laptop A 2004 laptop A 2005 laptop A 2006 laptop B 2007 laptop F 2008 laptop F 2009 laptop G 2010 laptop E 3001 printer E 3002 printer E 3003 printer D 3004 printer D 3005 printer H 3006 printer H 3007 printer

Explanation / Answer

For the given scenario subquery is used in WHERE clause in which pc price is conditionally checked if it is greater than the average price of all PC model.

Query-

SELECT model, price

FROM pc

WHERE price > (SELECT AVG(price) FROM pc);