Aggregate Functions
Aggregate Functions
Q3: Display the Rno, Name, Grade and Section on the basis of
calculation Marks*0.35 for those who got more than 70 marks.
Display the result section wise, descending order of the
calculation.
Ans : SELECT Rno, Name, Grade, Marks * 0.35 as Term1 from data
WHERE Marks > 70
ORDER BY Section ASC, Term1 DESC;
Sometimes you have a column where you want to arrange data as
per your own specified order. Then you can use the following
command.
Syntax : SELECT……ORDER BY FIELD(<column name>,<values
specifying order>);
Q5: Display the table Data with Project field having values in this
order : ‘Evaluated, ‘Pending’, Submitted’ and ‘Assigned’.