โ† All Data and Analytics Flashcard Decks

SQL and Database Fundamentals Flashcards

6 cards from real Data and Analytics practice questions. Tap to flip, then mark Knew It or Still Learning โ€” missed cards come back until you master them.

Read the first 6 SQL and Database Fundamentals flashcards as text
  1. Which SQL clause is used to filter rows after aggregation?

    Answer: HAVING

    HAVING filters groups created by GROUP BY, whereas WHERE filters individual rows before aggregation.

  2. What does a PRIMARY KEY constraint enforce in a relational database?

    Answer: Unique, non-null values per row

    A PRIMARY KEY ensures every row has a unique, non-null identifier in that column or set of columns.

  3. Which SQL JOIN returns only rows where there is a match in both tables?

    Answer: INNER JOIN

    INNER JOIN returns only the rows that have matching values in both joined tables.

  4. What is the purpose of an index in a relational database?

    Answer: To speed up data retrieval queries

    An index creates a data structure that allows the database engine to find rows faster without scanning the entire table.

  5. Which normal form eliminates transitive dependencies?

    Answer: 3NF

    Third Normal Form (3NF) removes transitive dependencies, ensuring non-key columns depend only on the primary key.

  6. What does the SQL DISTINCT keyword do?

    Answer: Removes duplicate rows from the result set

    DISTINCT eliminates duplicate rows from the query result, returning only unique value combinations.