1. Home
  2. Explore
  3. Computer Science
  4. SQL Full Course Tutorial

Study methods

Flashcards
Quiz
Fill in the blanks
Written test
Lesson
Notes
Podcast
Content

SQL Full Course Tutorial

  • 65Unfamiliar
  • 0Learning
  • 0Familiar
  • 0Mastered
Topic: SQL Fundamentals
SQL is the language used to communicate between you and a
.

65 questions

  1. 1
    SQL is the language used to communicate between you and a
    _____
    .
    Hint

    Think about where data is stored and accessed.

    Answer

    database

  2. 2
    The acronym CRUD stands for Create, Read, Update, and
    _____
    .
    Hint

    It's the fourth operation in the set of basic functions for persistent storage.

    Answer

    Delete

  3. 3
    DQL stands for Data Query Language and is used for the
    _____
    aspect of CRUD.
    Hint

    Which CRUD operation involves retrieving data?

    Answer

    read

  4. 4
    DML stands for Data Manipulation Language and is used for creating, updating, and deleting data in
    _____
    tables.
    Hint

    These operations modify data within tables that already exist.

    Answer

    existing

  5. 5
    DDL stands for Data Definition Language and deals with creating or deleting the
    _____
    and tables from scratch.
    Hint

    It also involves the overall structure of the database.

    Answer

    schemas

  6. 6
    Databases can be run locally or in the
    _____
    .
    Hint

    This option allows access from anywhere in an organization.

    Answer

    cloud

  7. 7
    Relational databases store data in rows and
    _____
    .
    Hint

    This structure is similar to a spreadsheet.

    Answer

    columns

  8. 8
    NoSQL stands for Not Only
    _____
    .
    Hint

    It's a broader category than just SQL.

    Answer

    SQL

  9. 9
    The database used in this course is
    _____
    because it is blazingly fast, free, open-source, and runs locally and in the cloud.
    Hint

    It satisfies all the criteria mentioned.

    Answer

    DuckDB

  10. 10
    Mother Duck is the managed cloud platform that allows you to host DuckDB databases in the
    _____
    .
    Hint

    It's the commercialized version that runs on cloud infrastructure.

    Answer

    cloud

  11. 11
    A data warehouse must be subject-oriented, non-volatile, integrated, and
    _____
    .
    Hint

    It stores historical data across different time periods.

    Answer

    time variant

  12. 12
    In an ERD, a fact table contains the core data for analysis, measuring and recording actual
    _____
    .
    Hint

    What do facts represent in a business process?

    Answer

    events

  13. 13
    Dimension tables describe attributes or
    _____
    of the data, supporting filtering and grouping.
    Hint

    They provide context to the facts.

    Answer

    dimensions

  14. 14
    The SELECT keyword identifies the columns or
    _____
    from a database.
    Hint

    It specifies what you want to retrieve.

    Answer

    data

  15. 15
    The FROM keyword identifies the
    _____
    we are connecting to.
    Hint

    It specifies the data source.

    Answer

    tables

  16. 16
    In SQL, the asterisk (*) is a special command that selects all
    _____
    from a table.
    Hint

    It represents everything in the table.

    Answer

    columns

  17. 17
    The LIMIT keyword is used to
    _____
    the number of rows returned by a query.
    Hint

    It restricts the output to a certain number.

    Answer

    limit

  18. 18
    The DISTINCT keyword, placed right after SELECT, returns only
    _____
    values from a column.
    Hint

    It eliminates duplicates.

    Answer

    unique

  19. 19
    A semicolon at the end of a query is a best practice and is crucial when building
    _____
    pipelines.
    Hint

    It terminates a statement in many databases.

    Answer

    data

  20. 20
    The WHERE clause is used to filter rows based on a specified
    _____
    .
    Hint

    It restricts which rows are returned.

    Answer

    condition

  21. 21
    NULL is a special marker that indicates a field does not have any
    _____
    .
    Hint

    It's not zero or empty string; it's unknown or missing.

    Answer

    value

  22. 22
    To filter for NULL values, you must use the
    _____
    operator instead of equals.
    Hint

    You cannot use = to check for NULL.

    Answer

    IS

  23. 23
    In SQL, comments can be added using double dashes for single-line or using forward slash asterisk for
    _____
    comments.
    Hint

    This allows you to comment out larger blocks.

    Answer

    multi-line

  24. 24
    The ORDER BY keyword sorts the result set by one or more
    _____
    .
    Hint

    It arranges output in ascending or descending order.

    Answer

    columns

  25. 25
    By default, ORDER BY sorts in
    _____
    order.
    Hint

    It starts with the smallest value first.

    Answer

    ascending

  26. 26
    To sort in descending order, you add the keyword
    _____
    after the column name.
    Hint

    It reverses the order.

    Answer

    DESC

  27. 27
    The correct order of SQL clauses is: SELECT, FROM, WHERE,
    _____
    , HAVING, ORDER BY, LIMIT.
    Hint

    This clause groups rows that have the same values.

    Answer

    GROUP BY

  28. 28
    Comparison operators include equal, not equal, greater than, less than, and
    _____
    .
    Hint

    This operator is used for pattern matching.

    Answer

    LIKE

  29. 29
    Logical operators include AND, OR, and
    _____
    .
    Hint

    It negates a condition.

    Answer

    NOT

  30. 30
    The AND operator returns rows only when
    _____
    conditions are true.
    Hint

    It's more restrictive.

    Answer

    both

  31. 31
    The OR operator returns rows when
    _____
    of the conditions is true.
    Hint

    It's less restrictive.

    Answer

    any

  32. 32
    The BETWEEN operator is used to filter values within a given
    _____
    .
    Hint

    It's inclusive of the boundaries.

    Answer

    range

  33. 33
    The IN operator allows you to specify multiple values in a WHERE clause more
    _____
    .
    Hint

    It replaces multiple OR conditions.

    Answer

    succinctly

  34. 34
    The underscore wildcard represents exactly
    _____
    character(s).
    Hint

    It matches a single character.

    Answer

    one

  35. 35
    The percent sign wildcard represents zero, one, or more
    _____
    .
    Hint

    It matches any sequence of characters.

    Answer

    characters

  36. 36
    Aliases are used to rename columns and
    _____
    to make queries easier to read.
    Hint

    They provide temporary names.

    Answer

    tables

  37. 37
    The arithmetic operators include addition, subtraction, multiplication, division, and
    _____
    .
    Hint

    It returns the remainder of division.

    Answer

    modulus

  38. 38
    Aggregate functions include COUNT, SUM, AVG, MIN, MAX, and
    _____
    .
    Hint

    It finds the middle value in a set.

    Answer

    MEDIAN

  39. 39
    COUNT(*) counts all rows in a table, including those with
    _____
    values.
    Hint

    It includes rows even if some columns are empty.

    Answer

    NULL

  40. 40
    The GROUP BY clause groups rows that have the same values into
    _____
    rows.
    Hint

    It aggregates data for each group.

    Answer

    summary

  41. 41
    The HAVING clause filters queries based on aggregate functions and
    _____
    .
    Hint

    It is used after GROUP BY.

    Answer

    groupings

  42. 42
    A primary key is a unique identifier for a row in a
    _____
    .
    Hint

    It ensures each row can be uniquely identified.

    Answer

    table

  43. 43
    A foreign key is a relationship to another table's
    _____
    key.
    Hint

    It links two tables together.

    Answer

    primary

  44. 44
    Information schema is a collection of read-only
    _____
    that provides metadata about the database.
    Hint

    It's like a catalog of database information.

    Answer

    views

  45. 45
    A LEFT JOIN returns all records from the left table and the matching rows from the
    _____
    table.
    Hint

    It preserves all rows from the first table.

    Answer

    right

  46. 46
    A RIGHT JOIN returns all records from the right table and the matching records from the
    _____
    table.
    Hint

    It's the reverse of LEFT JOIN.

    Answer

    left

  47. 47
    An INNER JOIN returns rows when there is a
    _____
    in both tables.
    Hint

    It only returns rows that have corresponding rows in both tables.

    Answer

    match

  48. 48
    A FULL OUTER JOIN returns all rows from both tables; if there is no match, the missing side is
    _____
    .
    Hint

    It combines the results of both LEFT and RIGHT joins.

    Answer

    NULL

  49. 49
    The PARSER in a database engine reads your SQL text and checks for
    _____
    .
    Hint

    It checks syntax and builds a parse tree.

    Answer

    validity

  50. 50
    The OPTIMIZER figures out the most efficient way to run your query by reordering joins and choosing scan strategies, thereby
    _____
    your SQL.
    Hint

    It improves performance.

    Answer

    optimizing

  51. 51
    The EXPLAIN keyword shows the query
    _____
    without executing the query.
    Hint

    It provides estimated row counts and operations.

    Answer

    plan

  52. 52
    EXPLAIN ANALYZE executes the query and provides runtime performance numbers for every
    _____
    .
    Hint

    It gives actual timings and row counts.

    Answer

    operator

  53. 53
    A CTE (Common Table Expression) is defined using the WITH keyword and creates a
    _____
    result set that can be referenced within a query.
    Hint

    It exists only during the execution of the query.

    Answer

    temporary

  54. 54
    A subquery is a query nested inside a
    _____
    query.
    Hint

    It is enclosed in parentheses.

    Answer

    larger

  55. 55
    The EXISTS operator is used to test for the existence of rows in a
    _____
    .
    Hint

    It returns true if the subquery returns any rows.

    Answer

    subquery

  56. 56
    The MERGE statement performs an INSERT, UPDATE, or DELETE operation based on whether rows
    _____
    between source and target.
    Hint

    It combines operations into one statement.

    Answer

    match

  57. 57
    Window functions perform calculations across a set of table rows that are related to the current row, while keeping the current row
    _____
    .
    Hint

    Unlike GROUP BY, they do not collapse rows.

    Answer

    intact

  58. 58
    The PARTITION BY clause in a window function divides the rows into
    _____
    within which the function operates.
    Hint

    It's like a GROUP BY for window functions.

    Answer

    groups

  59. 59
    The RANK window function assigns a rank to each row within a partition, with gaps in ranking for
    _____
    values.
    Hint

    If two rows have the same value, they get the same rank and the next rank is skipped.

    Answer

    tied

  60. 60
    The LAG function in window functions accesses data from a
    _____
    row in the same result set.
    Hint

    It looks backward.

    Answer

    previous

  61. 61
    The LEAD function accesses data from a
    _____
    row.
    Hint

    It looks forward.

    Answer

    following

  62. 62
    In DuckDB, an array is an ordered collection of the
    _____
    type values.
    Hint

    All elements must be of the same data type.

    Answer

    same

  63. 63
    A struct is a composite data type containing multiple named
    _____
    .
    Hint

    It's like a record with named attributes.

    Answer

    fields

  64. 64
    An array of structs combines an array and a struct, where each element of the array is a
    _____
    .
    Hint

    It's an array containing multiple structures.

    Answer

    struct

  65. 65
    JSON is a text-based serialization format for
    _____
    data.
    Hint

    It is commonly used in APIs.

    Answer

    nested

1 of 65
Question 1 of 65

Ask anything

We've read this whole study set, so questions about it get the best answers.

FlashcardsQuizFill in the blanksWritten testLessonNotesPodcastContent