Let's write some T-SQL!

Let's write some T-SQL!

University

9 Qs

quiz-placeholder

Similar activities

BAnDS Tournament Round 3

BAnDS Tournament Round 3

University - Professional Development

10 Qs

Flight Time Quiz - 8/25/2020

Flight Time Quiz - 8/25/2020

5th Grade - Professional Development

12 Qs

ภาษีหัก ณ ที่จ่าย

ภาษีหัก ณ ที่จ่าย

University

6 Qs

ภาษีหัก ณ ที่จ่าย

ภาษีหัก ณ ที่จ่าย

University

6 Qs

Basic Query

Basic Query

University - Professional Development

10 Qs

Bases de Datos

Bases de Datos

1st Grade - University

10 Qs

Let's practice! - String

Let's practice! - String

University

5 Qs

Quiz-Medicine 9

Quiz-Medicine 9

University - Professional Development

10 Qs

Let's write some T-SQL!

Let's write some T-SQL!

Assessment

Quiz

Specialty

University

Hard

Created by

Thuan Tran

Used 5+ times

FREE Resource

9 questions

Show all answers

1.

MULTIPLE SELECT QUESTION

1 min • 1 pt

Media Image

It's time to begin writing your own queries! In this first coding exercise, you will use SELECT statements to retrieve columns from a database table. You'll be working with the eurovision table, which contains data relating to individual country performance at the Eurovision Song Contest from 1998 to 2012.

Yes

Ok, let go!

2.

FILL IN THE BLANK QUESTION

1 min • 1 pt

Select the country column from the eurovision table.

3.

FILL IN THE BLANK QUESTION

1 min • 1 pt

Amend your query to return the points column instead of the country column.

SELECT country FROM eurovision;

4.

FILL IN THE BLANK QUESTION

1 min • 1 pt

Amend your query to return the points column instead of the country column.

SELECT country FROM eurovision;

5.

FILL IN THE BLANK QUESTION

1 min • 1 pt

Use TOP to change the existing query so that only the first 50 rows are returned.

SELECT ........ (........) points FROM eurovision;

6.

FILL IN THE BLANK QUESTION

1 min • 1 pt

  • Return a list of unique countries using DISTINCT. Give the results an alias of unique_country.

SELECT ........ country ........ unique_country FROM eurovision;

7.

FILL IN THE BLANK QUESTION

1 min • 1 pt

  • SELECT the country and event_year columns from the eurovision table.

SELECT ........ , ........ FROM ........;

8.

FILL IN THE BLANK QUESTION

1 min • 1 pt

  • Use a shortcut to amend the current query, returning ALL columns in the table.

SELECT country, event_year FROM eurovision;

9.

FILL IN THE BLANK QUESTION

1 min • 1 pt

  • This time, return only half the rows using 'TOP', using the same shortcut as before to return all columns.

SELECT ........ (50) PERCENT * FROM eurovision;