CBSE · 083Class XII · 2025Section D1 mark

Question 34i

4 March 2025 · Computer Science (083)

Assume that you are working in the IT Department of a Creative Art Gallery (CAG), which sells different forms of art creations like Paintings, Sculptures etc. The data of Art Creations and Artists are kept in tables Articles and Artists respectively. Following are few records from these two tables: Articles table:

CodeA_CodeArticleDOCPrice
PL001A0001Painting2018-10-1920000
SC028A0004Sculpture2021-01-1516000
QL005A0003Quilling2024-04-243000

Artists table:

A_CodeNamePhoneEmailDOB
A0001Roy595923r@CrAG.com1986-10-12
A0002Ghosh1122334ghosh@CrAG.com1972-02-05
A0003Gargi121212Gargi@CrAG.com1996-03-22
A0004Mustafa33333333Mf@CrAg.com2000-01-01

As an employee of CAG, you are required to write the SQL queries for the following : (i) To display all the records from the Articles table in descending order of price.

Answer

SELECT * FROM Articles ORDER BY Price DESC;

Explanation

Sorts all records by Price high to low.