SQL QUIZ

Create a visually appealing image with a database theme, showing SQL code snippets, a computer displaying database tables, and symbols representing data queries and management, all in a vibrant and engaging style.

SQL Mastery Quiz

Test your SQL skills with our engaging quiz designed to challenge your knowledge of database management and querying. Whether you're a beginner or an experienced developer, this quiz will help you identify your strengths and areas for improvement.

Key Features:

  • Covering essential SQL concepts
  • Multiple choice questions
  • Instant feedback on your answers
15 Questions4 MinutesCreated by QueryMaster241
The keywords AND, IN, LIKE, and between all belong to a category called what?
Joining operations
linking operations
Criteria operations
logical operations
You need to write a query that returns all Employees that have a LastName starting with the letter A. Which WHERE clause should you use to fill in the blank in this query?
WHERE LastName = A*
WHERE LastName = LIKE '%A%'
WHERE LastName LIKE 'A%'
WHERE LastName IN ('A*')
Given a table with the following structure, which query will not return the lowest grade earned by any student?
 
 
MCQ 3
SELECT StudentName FROM Students WHERE Grade = (SELECT MIN(Grade) FROM Student);
SELECT TOP(1) Grade FROM Students ORDER BY Grade;
SELECT MIN(Grade) FROM Students
SELECT MIN(Grade) FROM Students ORDER BY Grade;
Given the table below , which query shows How many students are in each department ?
 
mcq 4
Select Department, COUNT(*) FROM Students GROUP BY Department;
SELECT COUNT(*) FROM Students;
SELECT Student BY Department;
SELECT COUNT(*) FROM Students ORDER BY Department;
In a SELECT statement, which clause should always be used with the TOP clause in order to predictably indicate which rows are affected by TOP?
GROUP BY
HAVING
WHERE
ORDER BY
Which statement could you use to select a random student from this table?
SELECT TOP(1) first_name, last_name FROM Students ORDER BY NEWID();
SELECT TOP(1) RAND(first_name, last_name) FROM Student;
SELECT TOP(1) first_name, last_name FROM Student;
SELECT TOP(1) first_name, last_name FROM RAND(Student);
Your database currently has a table called Inventory in the Warehouse schema. You need to move the table to the Products schema. Which query accomplishes this goal?
ALTER SCHEMA Products TRANSFER Warehouse.Inventory;
ALTER TABLE Warehouse.Inventory TRANSFER Products.Inventory;
ALTER TABLE Warehouse.Inventory ADD SCHEMA Products;
ALTER SCHEMA Warehouse ADD TABLE Inventory;
Which keyword allows us to find the unique values in the database?
DISTINCT
UNIQUE
FIND
DIFF
Is there an error with this query? If so, which statement best describes the problem?
A.Yes, a WHERE clause cannot be used with an aggregate function.
B.No, there is nothing wrong with this query.
C. Yes, Cust_Name must be included in GROUP BY Clause.
A and C
You need to write a query that returns all products that have a SerialNumber ending with “10_3”. Which WHERE clause should you use to fill in the blank in this query?
WHERE SerialNumber LIKE '%10_3'
WHERE SerialNumber LIKE ('%10'+'_'+'3')
WHERE SerialNumber LIKE '%10"_"3'
WHERE SerialNumber LIKE '%10[_]3'
Which of the following allows you to uniquely identify a tuple?
Schema
Attribute
Super Key
Domain
What will be the output of the following code snippet?
1
0
Error
None
To combine the results of two or more SELECT statements, removing duplicates, which keyword can you use?
DEDUPE
SELECT
MERGE
UNION
What is the problem with this code?
There is no END WHILE statement;
The local varaible is not available to the WHILE block.
The query causes an infinite loop.
"Counter" is an invalid variable name.
What does a RIGHT JOIN ensure?
That only records from the rightmost table will be displayed
that no records from the rightmost table are displayed if the records dont have corresponding records in the left table
That records from the rightmost table will be displayed only if the records have a corresponding value in the leftmost table
that all records from the rightmost table are represented in the result, even if there are no corresponding records in the left table
{"name":"SQL QUIZ", "url":"https://www.quiz-maker.com/QPREVIEW","txt":"Test your SQL skills with our engaging quiz designed to challenge your knowledge of database management and querying. Whether you're a beginner or an experienced developer, this quiz will help you identify your strengths and areas for improvement.Key Features:Covering essential SQL conceptsMultiple choice questionsInstant feedback on your answers","img":"https:/images/course8.png"}
Powered by: Quiz Maker