Mastering Basic SQL Queries

Mastering Basic SQL Queries

10th Grade

8 Qs

quiz-placeholder

Similar activities

Questionário formativo - SI - Mód 2

Questionário formativo - SI - Mód 2

10th - 12th Grade

10 Qs

Programación de Base de Datos

Programación de Base de Datos

1st - 12th Grade

10 Qs

نشاط ختامي لاستعلام تحديد سجلات

نشاط ختامي لاستعلام تحديد سجلات

10th Grade

4 Qs

transact-SQL

transact-SQL

10th Grade - University

5 Qs

Quiz on SQL and Databases

Quiz on SQL and Databases

10th Grade

11 Qs

RDBMS  for class10

RDBMS for class10

10th - 12th Grade

10 Qs

SQL and databases

SQL and databases

KG - 12th Grade

10 Qs

ฐานข้อมูล

ฐานข้อมูล

1st - 10th Grade

10 Qs

Mastering Basic SQL Queries

Mastering Basic SQL Queries

Assessment

Quiz

Computers

10th Grade

Hard

Created by

Zameer Haider

FREE Resource

8 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the purpose of the `SELECT` statement in SQL?

To delete data from a database

To retrieve data from a database

To update data in a database

To insert data into a database

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which clause is used to specify the table from which to retrieve data in an SQL query?

SELECT

WHERE

FROM

ORDER BY

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What does the `WHERE` clause do in an SQL query?

It sorts the data in ascending order

It filters records based on specified conditions

It groups data based on a column

It limits the number of records returned

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following SQL statements correctly selects all columns from a table named `students`?

SELECT * FROM students;

SELECT students FROM *;

SELECT ALL FROM students;

SELECT columns FROM students;

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How would you write an SQL query to select only the `name` and `age` columns from a table called `people`?

SELECT name, age FROM people;

SELECT name AND age FROM people;

SELECT name, age IN people;

SELECT name, age OF people;

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which SQL query would you use to find all records in the `books` table where the `author` is 'J.K. Rowling'?

SELECT * FROM books WHERE author = 'J.K. Rowling';

SELECT * FROM books WHERE author IS 'J.K. Rowling';

SELECT * FROM books WHERE author LIKE 'J.K. Rowling';

SELECT * FROM books WHERE author IN 'J.K. Rowling';

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the result of the following SQL query: `SELECT name FROM employees WHERE salary > 30000;`?

It selects all employees with a salary less than £30,000

It selects the names of employees with a salary greater than £30,000

It selects all columns of employees with a salary greater than £30,000

It selects the names of employees with a salary equal to £30,000

8.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which SQL statement would you use to select all records from the `orders` table where the `quantity` is less than 10?

SELECT * FROM orders WHERE quantity < 10;

SELECT * FROM orders WHERE quantity = 10;

SELECT * FROM orders WHERE quantity > 10;

SELECT * FROM orders WHERE quantity <= 10;