Search Header Logo

W1 – SQL Basics Quiz

Authored by Bernard Zephaniah

Information Technology (IT)

Professional Development

Used 1+ times

W1 – SQL Basics Quiz
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

10 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

Your manager, Adwoa, is explaining the database structure. She points to the "customer_id" column in the customers table and says, "This column is special because it uniquely identifies every single customer. No two customers can have the same one." What is this type of column called?

Foreign Key

Unique Column

Primary Key

Index Column

2.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

In the database hierarchy, a Table (like customers) exists inside a ________, which in turn exists inside a Database.

Column

Schema

Server

Row

3.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

Adwoa gives you an Entity-Relationship Diagram (ERD) for a database. What is the primary purpose of this diagram for you as an analyst?

To see the actual data inside the tables.

To understand the tables, their columns, and how they are related to each other.

To check the performance of SQL queries.

To create new customer accounts.

4.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

To sort the results of a query from the highest value to the lowest value (e.g., most expensive to least expensive), you would use the ORDER BY clause followed by the keyword ____.

ASC

HIGH

DESC

LOW

5.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Kofi from Marketing asks for "a list of all customers who live in Kumasi AND registered after January 1st, 2024." Which WHERE clause correctly represents this request?

WHERE city = 'Kumasi' OR registration_date > '2024-01-01'

WHERE city = 'Kumasi' AND registration_date < '2024-01-01'

WHERE city = 'Kumasi' AND registration_date > '2024-01-01'

WHERE city = 'Kumasi' OR registration_date < '2024-01-01'

6.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

A colleague shows you this query: SELECT * FROM products WHERE price > 50 AND < 100;. It's not working. What is the correct way to write this condition?

WHERE price > 50 AND price < 100

WHERE price IS BETWEEN 50 TO 100

WHERE price > 50 OR < 100

WHERE price IN (50, 100)

7.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

You've written a complex query for a team report. What is a crucial "soft skill" action you should take before sharing it with your colleagues?

Add comments (--) to the SQL code to explain what each part of the query does.

Don't share the query, just the final results.

Name all your columns with short, one-letter aliases to save space.

Make sure to use as many subqueries as possible to show your skill.

Access all questions and much more by creating a free account

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?