Here is class 12 computer science [TYPE A] Unit 14 solutions for Sumita Arora back exercise assignment. Below includes both textual and video solutions wherever required. View all the answers in assignment for chapter 14 and for all chapters here.Watch all tutorials for chapter 12.
The SQL ORDER BY clause is used to sort the data in ascending or descending order, based on one or more columns. SQL sort the query results in ascending order by default.
SQL sort the query results in ascending order by default.
ASC is for the ascending order sorting and DESC is for the descending order sorting.Such as in below shown code.
SELECT * FROM STUDENT1 ORDER BY AvgMark DESC;
SELECT prod_id, prod_price, prod_name, pros_discount FROM Products ORDER BY prod_price, prod_name, prod_discount DESC;
SELECT Project-Group, section, Marks FROM Student ORDER BY Project-Group ASC, section DESC, Marks DESC;
The main difference between WHERE and HAVING clause comes when used together with GROUP BY clause, in this case WHERE is used to filter rows before grouping and HAVING is used to exclude records after grouping.
GROUP BY clause can be used in a SELECT statement to collect data across multiple records and group the results by one or more columns with ease.
An aggregate function performs a calculation one or more values and returns a single value.The aggregate function is often used with the GROUP BY clause and HAVING clause of the SELECT statement.
Some examples are SUM(), COUNT(), MIN(), MAX(), VAR(), STDEV().
The SELECT statement used in the GROUP BY clause can only be used contain column names, aggregate functions, constants and expressions.The HAVING clause is used to restrict the results returned by the GROUP BY clause.
Clear Doubts with Computer TutorIn case you’re facing problems in understanding concepts, writing programs, solving questions, want to learn fun facts | tips | tricks or absolutely anything around computer science, feel free to join CTs learner-teacher community: students.computertutor.in
You cannot copy content of this page