Search Header Logo

aggeregate function quiz

Authored by radhika jindal

Computers

University

Used 1+ times

aggeregate function quiz
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

15 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following is an aggregate function in SQL?

count( )

group by

order by

where

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What does the SUM() function do in SQL?

Counts the number of rows

Returns the highest value in a column

Adds up the numeric values in a column

Returns the average value of a numeric column

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which SQL query will return the average salary from the employees table?

SELECT AVG(salary) FROM employees;

SELECT MEAN(salary) FROM employees;

SELECT TOTAL(salary) FROM employees;

SELECT AVERAGE(salary) FROM employees;

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What does the COUNT(*) function do?

Counts the number of non-null values in a column

Counts the number of distinct values in a column

Counts the total number of rows in a table

Counts the number of columns in a table

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which SQL function would you use to find the highest value in a numeric column?

Heights( )

top( )

max( )

largest( )

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How can you calculate the total number of distinct departments in the employees table?

SELECT COUNT(department) FROM employees;

SELECT COUNT(DISTINCT department) FROM employees;

SELECT DISTINCT COUNT(department) FROM employees;

SELECT COUNT(*) DISTINCT FROM employees;

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How would you find the total number of unique job titles in the employees table?

SELECT DISTINCT COUNT(title) FROM employees;

SELECT COUNT(DISTINCT title) FROM employees;

SELECT COUNT(UNIQUE title) FROM employees;

SELECT COUNT(*) FROM employees GROUP BY title;

Access all questions and much more by creating a free account

Create resources

Host any resource

Get auto-graded reports

Google

Continue with Google

Email

Continue with Email

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

Already have an account?