SQL Select: The Basics

Reviewed by Editorial Team
The ProProfs editorial team is comprised of experienced subject matter experts. They've collectively created over 10,000 quizzes and lessons, serving over 100 million users. Our team includes in-house content moderators and subject matter experts, as well as a global network of rigorously trained contributors. All adhere to our comprehensive editorial guidelines, ensuring the delivery of high-quality content.
Learn about Our Editorial Process
| By Castle96
C
Castle96
Community Contributor
Quizzes Created: 1 | Total Attempts: 320
| Attempts: 320 | Questions: 12
Please wait...
Question 1 / 12
0 %
0/100
Score 0/100
1. Looking at the image below, please select what kind of key term_key is in the term_dimension.

Explanation

It is a primary key because it is the uniquely identifying field for that table as opposed to just the key that links to a dimension with more data associated with a primary key.

Submit
Please wait...
About This Quiz
SQL Select: The Basics - Quiz

This is a quiz to test the knowledge of SQL basics based on a lesson given to learners.

2. Fill in the Blank.  SQL stands for ____________________________.

Explanation

SQL is a programming language designed for managing data held in relational databases

Submit
3. Benefits of SQL includes being flexible, universal, and requires learning only a very few and simple commands

Explanation

All statements are true. SQL is very flexible and can be used in any number of SQL applications that can connect to a relational database...and as you have learned, it takes very few commands to get started in executing a SQL select statement

Submit
4. Which of the following are OPTIONAL parts of a SQL select statement?

Explanation

All of the selections are possible as optional parts of the SQL. It is important that any special conditions for using the optional components are met to execute the query.

Submit
5. Looking at the image below, please determine what kind of key is course_eval_department_key

Explanation

It is a foreign key because it is listed in a FACT table along with a number of other foreign keys. These are "links" to other tables to create joins so the dimensional data can be included with numerical type data often existing in a FACT table.

Submit
6. Please review the SQL statement below.  Will the SELECT statement execute successfully?

Explanation

Even though this looks like a very complex statement, it will not execute because it is missing a semi-colon. Something as simple as a missing semi-colon can cause even a simple SQL statement to fail to execute. It is very important to ensure you have ALL parts of the statement every time you want to execute it.

Submit
7. Looking at the datamodel above, please select the column you would NOT use in a join between multiple tables if the select statement had the following columns:  department_desc, course_title, instructor_full_name, essay_response_text

Explanation

Because there are no columns being selected from the course_eval_question_dimension, and we do not know if there is a filter using it, there is no reason to create a join using the course_eval_question_key.

Submit
8. Looking at the datamodel above, select which tables would be used to return data from the columns: term_code, question_id, question_text, and scaled_response_number.

Explanation

The columns dictate that there are three tables to use. Question_id and question_text can be gleaned from course_eval_question_dimension. Term_code will come from the _term_dimension...and finally, scaled_response_number will be pulled from the course_eval_responses_detail fact table.

Submit
9. Which of the following statements, including both required and optional elements, will execute successfully?

Explanation

One answer only has required parts,one answer has no FROM element, and one has an order by that has a column NOT in the select.

Submit
10. What are the 5 parts of a SELECT statement that are required to execute successfully?

Explanation

At a minimum, these 5 parts MUST be present to execute a SQL select statement. There are some applications that may let the user eliminate the need for a semi-colon, but it is rare. Good practice is to use it to correctly define the end of a SQL statement

Submit
11. Which of the following is NOT a commonly accepted rule for joining multiple tables?

Explanation

Using keywords as an alias is NOT allowed under relational database rules. Keywords are reserved words (such as FROM, WHERE, SELECT, etc) that will return an error if attempted to be used. Most SQL editors will warn/notify the user that a keyword has been selected.

Submit
12. Which of the following statements include ONLY the required elements needed to execute?

Explanation

Of the options that are incorrect, one has no semi-colon, one has no FROM element, and one includes optional parts in the statement. Only the select where department_desc is being selected from department_dimension (ending in a semi-colon) contains all 5 required elements, and ONLY those elements.

Submit
View My Results

Quiz Review Timeline (Updated): Mar 22, 2023 +

Our quizzes are rigorously reviewed, monitored and continuously updated by our expert board to maintain accuracy, relevance, and timeliness.

  • Current Version
  • Mar 22, 2023
    Quiz Edited by
    ProProfs Editorial Team
  • Aug 12, 2013
    Quiz Created by
    Castle96
Cancel
  • All
    All (12)
  • Unanswered
    Unanswered ()
  • Answered
    Answered ()
Looking at the image below, please select what kind of key term_key is...
Fill in the Blank.  SQL stands for ____________________________.
Benefits of SQL includes being flexible, universal, and requires...
Which of the following are OPTIONAL parts of a SQL select statement?
Looking at the image below, please determine what kind of key is...
Please review the SQL statement below.  Will the SELECT statement...
Looking at the datamodel above, please select the column you would NOT...
Looking at the datamodel above, select which tables would be used to...
Which of the following statements, including both required and...
What are the 5 parts of a SELECT statement that are required to...
Which of the following is NOT a commonly accepted rule for joining...
Which of the following statements include ONLY the required elements...
Alert!

Advertisement