Which query do you use to answer the question “What is the average salary of the employees”? A. Search query B. Cross tab query C. Select query D. Update query

Search query
Cross tab query
Select query
Update query

The correct answer is C. Select query.

A select query is a type of database query that retrieves data from a database. It is the most common type of query and is used to select specific data from a table or view.

A search query is a type of query that is used to find information on the internet. It is used to search for websites, images, videos, and other types of content.

A cross tab query is a type of query that is used to summarize data from multiple tables. It is used to create a table that shows the totals of a particular field for each group of records.

An update query is a type of query that is used to change data in a database. It is used to update the values of fields in a table or view.

In the given question, the user wants to know the average salary of the employees. This can be calculated by using a select query. The select query will retrieve the salary data from the employee table and calculate the average.

The following is an example of a select query that can be used to answer the question:

sql
SELECT AVG(salary) AS average_salary
FROM employees;

This query will return the average salary of all employees in the employees table.

Exit mobile version