SQL Server Course for Beginners with 100+ examples - AVG() Function

SQL Server Course for Beginners with 100+ examples - AVG() Function

Assessment

Interactive Video

Information Technology (IT), Architecture

University

Hard

Created by

Quizizz Content

FREE Resource

The video tutorial demonstrates how to use the SUM function in SQL to calculate the total sum of a numeric column, specifically focusing on an employee salary column in a database. It covers viewing the employee table, calculating total salaries, and applying conditions to sum only salaries above a certain threshold.

Read more

5 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the primary purpose of the SUM function in SQL?

To calculate the average of a column

To find the maximum value in a column

To count the number of rows in a table

To return the total sum of a numeric column

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which SQL command is used to view all records in a table?

DISPLAY * FROM table_name

SHOW ALL FROM table_name

VIEW ALL FROM table_name

SELECT * FROM table_name

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How do you specify the column to sum in an SQL query?

SUM(column_name)

AGGREGATE(column_name)

ADD(column_name)

TOTAL(column_name)

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What SQL clause is used to filter records before applying the SUM function?

ORDER BY

GROUP BY

HAVING

WHERE

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

If you want to sum only salaries greater than or equal to 7000, which condition would you use?

salary >= 7000

salary <= 7000

salary = 7000

salary < 7000