MCQ IN COMPUTER SCIENCE & ENGINEERING

COMPUTER SCIENCE AND ENGINEERING

SQL

Question [CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
Which of the following are the five built-in functions provided by SQL?
A
COUNT, SUM, AVG, MAX, MIN
B
SUM, AVG, MIN, MAX, MULT
C
SUM, AVG, MULT, DIV, MIN
D
SUM, AVG, MIN, MAX, NAME
Explanation: 

Detailed explanation-1: -COUNT, SUM, AVG, MAX and MIN is the built-in functions provided by SQL. DIV and MULT are not available in SQL.

Detailed explanation-2: -In SQL, the function-avg, min, max, sum, count is called as aggregate function. Aggregate functions return a single value after calculating from a group of values.

Detailed explanation-3: -1 Answer. The correct answer is option A (COUNT, SUM, AVG, MAX, MIN). All these are aggregate functions that are in-built functions provided by SQL. These five functions perform calculations on the result-set and return the single value.

Detailed explanation-4: -SQL function There are two types of SQL functions, aggregate functions, and scalar(non-aggregate) functions. Aggregate functions operate on many records and produce a summary, works with GROUP BY whereas non-aggregate functions operate on each record independently.

There is 1 question to complete.