Informatics Practices
Consider a table named Employees with columns — EName, Age, Salary and Designation. Which SQL statement do we use to find out the total salary given to employees?
- Select SUM(Salary) From Employees;
- Select COUNT (*) From Employees;
- Select FIND (*) From Employees;
- Select SUM () From Employees;
SQL Queries
2 Likes
Answer
Select SUM(Salary) From Employees;
Reason — The SQL statement used to find out the total salary given to employees is SELECT SUM(Salary) FROM Employees;. This statement utilizes the SUM() function to calculate the total value of the 'Salary' column from the 'Employees' table.
Answered By
3 Likes
Related Questions
Which one of the following is not an aggregate function ?
- ROUND()
- SUM()
- COUNT()
- AVG()
Which of the following functions is used to find the largest value from the given data in MySQL?
- MAX()
- MAXIMUM()
- LARGEST()
- BIG()
Which clause in SQL is used to apply a condition on a group?
- Where
- Having
- As
- On
In SQL, which function is used to extract a date from a date expression?
- Now()
- Curdate()
- Date()
- Day()