Let's sort it!

Let's sort it!

Assessment

Assessment

Created by

Thuan Tran

Specialty

University

3 plays

Hard

Student preview

quiz-placeholder

10 questions

Show all answers

1.

MULTIPLE SELECT

1 min • 1 pt

Media Image

In this exercise, you'll practice the use of ORDER BY using the grid dataset. It's loaded and waiting for you! It contains a subset of wider publicly available information on US power outages.

2.

FILL IN THE BLANK

1 min • 1 pt

Select description and event_date from grid table. Your query should return the first 5 rows, ordered by event_date.

SELECT ........ (........) ........, event_date FROM grid

........ ........ ........;

3.

MULTIPLE CHOICE

1 min • 1 pt

Select the top 20 rows from description, nerc_region and event_date. Order by nerc_region, affected_customers & event_date. Event_date should be in descending order.

4.

FILL IN THE BLANK

1 min • 1 pt

  • Select the description and event_year columns. Return rows where the description is 'Paris'.

SELECT ......., ....... FROM grid WHERE ....... = 'Paris';

5.

FILL IN THE BLANK

1 min • 1 pt

  • Select the nerc_region and demand_loss_mw columns, limiting the results to those where affected_customers is greater than or equal to 500000.

SELECT ......., ....... FROM grid WHERE ....... >= 500000;

6.

FILL IN THE BLANK

1 min • 1 pt

  • Update your code to select description and affected_customers, returning records where the event_date was the 22nd December, 2023.

SELECT nerc_region, demand_loss_mw FROM grid

WHERE affected_customers >= 500000;

7.

FILL IN THE BLANK

1 min • 1 pt

  • Fill in the blank

  • Limit the results to those where the affected_customers is BETWEEN 50000 and 150000.

SELECT description, affected_customers, event_date FROM grid

WHERE _____;

8.

FILL IN THE BLANK

1 min • 1 pt

  • Fill in the blank

  • Order in descending order of event_date.

SELECT description, affected_customers, event_date FROM grid

WHERE affected_customers BETWEEN 50000 AND 150000

______;

9.

FILL IN THE BLANK

1 min • 1 pt

  • Use a shortcut to select all columns from grid table. Then filter the results to only include rows where demand_loss_mw is unknown or missing.

SELECT ......... FROM grid WHERE ...........

10.

FILL IN THE BLANK

1 min • 1 pt

  • Adapt your code to return rows where demand_loss_mw is not unknown or missing.

SELECT * FROM grid WHERE demand_loss_mw IS NULL;

Explore all questions with a free account

or continue with
Microsoft
Apple
Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?

Find a similar activity

Create activity tailored to your needs using

Quizizz AI
Let's write some T-SQL!

9 questions

Let's write some T-SQL!

assessment

University

ITIL 4 PHE

15 questions

ITIL 4 PHE

assessment

University

C2 policy

5 questions

C2 policy

assessment

University

Basic Query

10 questions

Basic Query

assessment

University - Professi...

BAnDS Tournament Round 3

10 questions

BAnDS Tournament Round 3

assessment

University - Professi...

Quiz Strategic

10 questions

Quiz Strategic

assessment

University

4.08 Review

7 questions

4.08 Review

assessment

KG - University

4.07

7 questions

4.07

assessment

KG - University