Get the answers you need from a community of experts on IDNLearn.com. Join our Q&A platform to access reliable and detailed answers from experts in various fields.
Answer:
Following are the query to the given question:
Explanation:
Query:
SELECT ProductName,listprice FROM Products where listprice > (SELECT AVG (p.listprice) FROM productsp) ORDER BY listprice DESC;
Description:
In the above-given query, multiple select statements are used, in the first statement, it selects the column that is "ProductName and listprice" from the products table and uses where clause to check the listprice that is greater than another select statement.
In this, it calculates the average listprice of the table and converts a value into descending order.