M12 - SQL Query

M12 - SQL Query

University

10 Qs

quiz-placeholder

Similar activities

Governance and Management Quiz

Governance and Management Quiz

7th Grade - University

15 Qs

TOUR MANAGER AND TRAVEL PLANNING

TOUR MANAGER AND TRAVEL PLANNING

University

10 Qs

Southwest/ west state quiz

Southwest/ west state quiz

KG - Professional Development

14 Qs

Guess The Flags [HARD]

Guess The Flags [HARD]

10th Grade - Professional Development

12 Qs

Unit 4  Europe

Unit 4 Europe

9th Grade - University

15 Qs

Explore a subdivision.mdb

Explore a subdivision.mdb

University

7 Qs

M11 - Query SQL SBD

M11 - Query SQL SBD

University

5 Qs

M12 - SQL Query

M12 - SQL Query

Assessment

Quiz

Geography

University

Easy

Created by

ALI SUROJAYA

Used 3+ times

FREE Resource

10 questions

Show all answers

1.

FILL IN THE BLANK QUESTION

30 sec • 1 pt

To find the average salary for each department, you would use the following SQL query:

SELECT Department, AVG(Salary)
FROM Employees
GROUP BY _____;

2.

FILL IN THE BLANK QUESTION

30 sec • 1 pt

To get students who have a GPA greater than 3.5 and are majoring in 'Engineering', you would use the following SQL query:

SELECT *

FROM Students

WHERE GPA > 3.5 ___ Major = 'Engineering';

3.

FILL IN THE BLANK QUESTION

30 sec • 1 pt

To find the maximum order amount for each customer, you would use the following SQL query:
SELECT CustomerID, MAX(OrderAmount)

FROM Orders

GROUP BY _____;

4.

FILL IN THE BLANK QUESTION

30 sec • 1 pt

Retrieve employee names and their corresponding department names from the employees and departments tables:

SELECT employees.name, departments.department_name

FROM employees

_____ departments

ON employees.department_id = departments.id;

5.

FILL IN THE BLANK QUESTION

30 sec • 1 pt

Find the total number of hours worked by each employee from the timesheets table:

SELECT employee_id, _____(hours) AS total_hours_worked

FROM timesheets

GROUP BY employee_id;

6.

FILL IN THE BLANK QUESTION

30 sec • 1 pt

Retrieve the name and highest score of students from the scores table:

SELECT name, _____(score) FROM scores;

7.

FILL IN THE BLANK QUESTION

30 sec • 1 pt

List all employees and their respective managers' names from the employees table (assuming the table has a manager_id field):

SELECT e1.name AS employee_name, e2.name AS manager_name

FROM employees e1 _____ employees e2 ON e1.manager_id = e2.id;

Create a free account and access millions of resources

Create resources
Host any resource
Get auto-graded reports
or continue with
Microsoft
Apple
Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?