M12 - SQL Query

M12 - SQL Query

University

10 Qs

quiz-placeholder

Similar activities

VLC PLUS - MINIGAME

VLC PLUS - MINIGAME

University

10 Qs

US Tivia

US Tivia

KG - University

10 Qs

Stafo Africa 2021 - Demography and Geography (Herbst: 4,5)

Stafo Africa 2021 - Demography and Geography (Herbst: 4,5)

University

10 Qs

GIS practice final:  part 2 (material since the midterm)

GIS practice final: part 2 (material since the midterm)

University

15 Qs

The Pollution Quiz

The Pollution Quiz

2nd Grade - Professional Development

10 Qs

Partitioning of Pakistan & India

Partitioning of Pakistan & India

10th Grade - University

15 Qs

Natural Vegetation and Wildlife 2

Natural Vegetation and Wildlife 2

9th Grade - Professional Development

14 Qs

GenGeo Unit 11

GenGeo Unit 11

University

15 Qs

M12 - SQL Query

M12 - SQL Query

Assessment

Quiz

Geography

University

Practice Problem

Easy

Created by

ALI SUROJAYA

Used 3+ times

FREE Resource

AI

Enhance your content in a minute

Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...

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

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?