Search Header Logo

5.2 Transform Data in SQL Quiz

Authored by David Eng

Computers

11th Grade

Used 3+ times

5.2 Transform Data in SQL Quiz
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

9 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

2. Evelyn, Jackson, and Oliver are working on a database project. They are stuck at a point where they need to merge two columns in SQL. Can you help them out? How can they concatenate two columns in SQL?

CONCAT(column1, column2)

ADD(column1, column2)

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

3. Imagine Olivia, Ava, and Isla are playing a game of 'SQL Function Trivia'. They come across a card that asks, 'What is the purpose of the SQL function 'SUBSTRING'?' Can you help them answer?

To convert a string to uppercase

To extract a substring from a string.

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

4. Charlotte, Ethan, and Olivia are having a friendly competition to see who can clean up their SQL code the fastest. They need to remove leading and trailing spaces from a string. Which SQL command should they use to win the competition?

TRIM

REMOVE

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

5. Grace, Rohan, and Isla are having a friendly debate about SQL functions. They are particularly interested in the difference between 'CAST' and 'CONVERT'. Can you help them out?

The 'CAST' function is used to convert data types, while the 'CONVERT' function is used to convert data types and also allows for additional formatting options.

The 'CAST' function is used for date and time manipulation, while the 'CONVERT' function is used for mathematical calculations.

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

6. Michael, Aria, and Lily are having a friendly competition to see who can replace a specific substring in a string with another substring in SQL the fastest. Which method should they use?

They should use the REPLACE function

They should use the MODIFY function

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

7. Scarlett, James, and Elijah are having a friendly competition to see who can write the longest SQL string! Which SQL function should they use to calculate the length of their strings?

LEN()

MAX()

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

8. Olivia, Lily, and James are having a friendly competition to see who can extract the year from a date in SQL the fastest. Can you help them out?

SELECT EXTRACT(YEAR FROM your_date_column) AS year FROM your_table_name;

SELECT DATEPART(YEAR, your_date_column) AS year FROM your_table_name;

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?