SQL Select: The Basics

12 Questions | Total Attempts: 108

SettingsSettingsSettings
Please wait...
SQL Select: The Basics

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


Questions and Answers
  • 1. 
    Which of the following is NOT a commonly accepted rule for joining multiple tables?
    • A. 

      It is commonly accepted to list joins between tables before other items in the WHERE clause

    • B. 

      It is recommended that aliases be keywords to keep the statement uniform throughout

    • C. 

      It is recommended that joins between tables are based on Primary/Foreign keys

    • D. 

      Any table listed in a join statement MUST exist in the FROM element

  • 2. 
    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.
    • A. 

      Course_eval_responses_detail, term_dimension

    • B. 

      course_eval_section_dimension, term_dimension, response_date_dimension

    • C. 

      Course_eval_responses_detail, response_date_dimension, course_eval_section_attr_dim

    • D. 

      Course_eval_responses_detail, term_dimension, course_eval_question_dimension

  • 3. 
    Which of the following are OPTIONAL parts of a SQL select statement?
    • A. 

      ORDER BY

    • B. 

      GROUP BY

    • C. 

      WHERE

    • D. 

      AND/OR

    • E. 

      ALL are valid optional parts

  • 4. 
    Looking at the image below, please determine what kind of key is course_eval_department_key
    • A. 

      Primary

    • B. 

      Foreign

  • 5. 
    Which of the following statements, including both required and optional elements, will execute successfully?
    • A. 

      SELECT department_desc WHERE department_code = '0012';

    • B. 

      SELECT * FROM department_dimension;

    • C. 

      SELECT department_desc FROM department_dimension ORDER BY department_code;

    • D. 

      SELECT department_code, department_desc FROM department_dimension WHERE college_code in ('01','08') ORDER BY department_code;

  • 6. 
    Which of the following statements include ONLY the required elements needed to execute?
    • A. 

      SELECT * FROM department_dimension

    • B. 

      SELECT department_code FROM department_dimension WHERE department_code = '0012';

    • C. 

      SELECT department_desc FROM department_dimension;

    • D. 

      SELECT department_desc WHERE department_code = '0012';

  • 7. 
    Looking at the image below, please select what kind of key term_key is in the term_dimension.
    • A. 

      Primary

    • B. 

      Foreign

  • 8. 
    Benefits of SQL includes being flexible, universal, and requires learning only a very few and simple commands
    • A. 

      True

    • B. 

      False

  • 9. 
    Fill in the Blank.  SQL stands for ____________________________.
    • A. 

      Standard Quantifying Logistics

    • B. 

      Systematic Query Language

    • C. 

      Structured Query Language

    • D. 

      Standard Query Linguistics

  • 10. 
    Please review the SQL statement below.  Will the SELECT statement execute successfully?
    • A. 

      Yes

    • B. 

      No

  • 11. 
    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
    • A. 

      Course_eval_section_key

    • B. 

      Course_eval_question_key

    • C. 

      Course_eval_department_key

    • D. 

      Course_eval_instructor_key

  • 12. 
    What are the 5 parts of a SELECT statement that are required to execute successfully?
    • A. 

      SELECT, FROM, column, semi-colon, table

    • B. 

      SELECT, FROM, table, WHERE, semi-colon

    • C. 

      Column, FROM, table, ORDER BY, semi-colon

    • D. 

      Column, table, WHERE, ORDER BY, GROUP BY

Related Topics
Back to Top Back to top