🌍 Data Analytics · subject

Data Analytics Data Wrangling and SQL Syllabus

The Data Wrangling and SQL syllabus for Data Analytics in full: 6 chapters and 27 topics, every one listed below, plus 51 Data Wrangling and SQL flashcards with answers.

6Chapters
27Topics
51Flashcards

Data Wrangling and SQL syllabus: all 6 chapters

Expand any chapter to see its topics and sub-topics.

  1. Spreadsheets for Analysis

    4 topics
    • Formulas and Functions
    • Pivot Tables
    • Conditional Formatting
    • Charts in Spreadsheets
  2. Relational Databases

    4 topics
    • Tables, Keys and Relationships
    • Database Schemas and Normalization
    • Primary and Foreign Keys
    • Entity-Relationship Modeling
  3. SQL Fundamentals

    4 topics
    • SELECT and FROM
    • WHERE Filtering
    • ORDER BY and LIMIT
    • DISTINCT and Aliases
  4. SQL Aggregation and Joins

    4 topics
    • GROUP BY and HAVING
    • Aggregate Functions
    • Joins
    • Unions
  5. Advanced SQL

    5 topics
    • Subqueries
    • Common Table Expressions (CTEs)
    • Window Functions
    • CASE Statements
    • Query Optimization and Indexing
  6. Data Cleaning and Preparation

    6 topics
    • Handling Missing Values
    • Removing Duplicates
    • Data Type Conversion
    • Outlier Detection and Treatment
    • Data Transformation and Standardization
    • Data Validation and Integrity

Data Analytics Data Wrangling and SQL flashcards — 51 questions with answers

  1. In spreadsheets, what is the difference between a relative reference (A1) and an absolute reference ($A$1) in a formula?

    A relative reference (A1) shifts its row/column when the formula is copied to another cell. An absolute reference ($A$1) is locked and stays fixed when copied. Mixed forms like $A1 or A$1 lock only the column or only the row.

  2. What does the spreadsheet function VLOOKUP do, and what is its basic argument order?

    VLOOKUP searches for a value in the leftmost column of a range and returns a value from a specified column in the same row. Syntax: VLOOKUP(lookup_value, table_array, col_index_num, [range_lookup]). Use FALSE (exact match) for range_lookup in most cases.

  3. When would you use INDEX/MATCH instead of VLOOKUP in a spreadsheet?

    Use INDEX/MATCH when the lookup column is to the right of the return column (VLOOKUP can only look right), when you need faster performance on large sheets, or when column insertions would break a hard-coded VLOOKUP index. MATCH finds the position and INDEX returns the value at that position.

  4. What is the difference between the spreadsheet functions COUNT, COUNTA, and COUNTIF?

    COUNT counts only numeric cells. COUNTA counts all non-empty cells (numbers, text, etc.). COUNTIF counts cells in a range that meet a single specified condition, e.g. COUNTIF(A1:A10, ">5").

  5. What does the spreadsheet IF function do, and give its syntax.

    IF returns one value when a logical test is TRUE and another when it is FALSE. Syntax: IF(logical_test, value_if_true, value_if_false). It can be nested or combined with AND/OR for multiple conditions.

  6. What is a Pivot Table used for in a spreadsheet?

    A Pivot Table is an interactive tool that summarizes, groups, and aggregates large datasets without formulas. It lets you drag fields into Rows, Columns, Values, and Filters areas to quickly compute totals, counts, averages, and cross-tabulations.

  7. In a Pivot Table, what is the role of each of the four areas: Rows, Columns, Values, and Filters?

    Rows: field values listed vertically as row labels. Columns: field values spread horizontally as column headers. Values: the numeric field being aggregated (sum, count, average, etc.). Filters: field that restricts which records are included in the whole table.

  8. What is Conditional Formatting in a spreadsheet?

    Conditional Formatting automatically applies visual styling (colors, data bars, color scales, icon sets) to cells based on rules or their values, so patterns, outliers, and thresholds become visible without manual formatting.

  9. Name three common types of conditional formatting rules used to visualize data.

    (1) Highlight/cell rules (e.g. greater than a value, duplicate values). (2) Color scales (a gradient mapping value magnitude to color). (3) Data bars or icon sets that show relative magnitude within each cell.

  10. Which spreadsheet chart type is best for showing composition (parts of a whole), and which is best for showing trends over time?

    A pie chart (or 100% stacked bar) is best for composition/parts of a whole. A line chart is best for showing trends over continuous time. Bar/column charts are best for comparing discrete categories.

  11. In relational database terms, what is a table, and what do its rows and columns represent?

    A table (relation) is a structured set of data about one entity type. Each row (record/tuple) is one instance of that entity, and each column (field/attribute) holds one property with a defined data type.

  12. What is a database schema?

    A database schema is the formal blueprint that defines the structure of a database: its tables, columns and data types, keys, relationships, constraints, and how the tables connect. It describes the logical organization, not the data itself.

  13. What is database normalization and why is it done?

    Normalization is the process of organizing tables and columns to reduce data redundancy and improve integrity by decomposing tables and defining relationships. It prevents insertion, update, and deletion anomalies by ensuring each fact is stored in exactly one place.

  14. State the requirement of First Normal Form (1NF).

    A table is in 1NF if every column holds atomic (indivisible) values, there are no repeating groups or multi-valued cells, and each row is unique (typically identified by a primary key).

  15. State the requirement of Second Normal Form (2NF).

    A table is in 2NF if it is in 1NF and every non-key attribute is fully functionally dependent on the entire primary key, not just part of it. This removes partial dependencies (relevant when there is a composite key).

  16. State the requirement of Third Normal Form (3NF).

    A table is in 3NF if it is in 2NF and has no transitive dependencies, i.e. no non-key attribute depends on another non-key attribute. Every non-key attribute must depend only on the primary key.

  17. What is a primary key in a relational table?

    A primary key is a column (or set of columns) that uniquely identifies each row in a table. It must be unique and cannot contain NULL values. Each table can have at most one primary key.

  18. What is a foreign key, and what does it enforce?

    A foreign key is a column (or set of columns) in one table that references the primary key of another table. It enforces referential integrity, ensuring that a value in the child table must correspond to an existing row in the parent table.

  19. What is the difference between a composite key and a candidate key?

    A candidate key is any column or set of columns that could uniquely identify a row (one is chosen as the primary key). A composite key is a key made of two or more columns combined to achieve uniqueness.

  20. In Entity-Relationship (ER) modeling, what do entities, attributes, and relationships represent?

    An entity is a real-world object or concept about which data is stored (becomes a table). An attribute is a property of an entity (becomes a column). A relationship is an association between entities (implemented via keys).

Show the other 31 Data Wrangling and SQL flashcards
  1. List the three main types of cardinality in an ER model.

    One-to-one (1:1): each row in A relates to at most one row in B. One-to-many (1:N): one row in A relates to many rows in B. Many-to-many (M:N): rows in A relate to many in B and vice versa, usually resolved with a junction/bridge table.

  2. How is a many-to-many relationship implemented in a relational database?

    It is implemented with a junction (bridge/associative) table that holds foreign keys pointing to the primary keys of both related tables. Each row represents one pairing, turning the M:N relationship into two 1:N relationships.

  3. What do the SELECT and FROM clauses do in a SQL query?

    SELECT specifies which columns (or expressions) to return in the result set. FROM specifies the table (or tables) from which to retrieve the rows. SELECT * returns all columns.

  4. What does the WHERE clause do in SQL, and give an example.

    WHERE filters rows, returning only those that satisfy a condition, before any grouping. Example: SELECT name FROM customers WHERE country = 'US' AND age >= 18.

  5. In a SQL WHERE clause, what is the difference between the IN, BETWEEN, and LIKE operators?

    IN tests whether a value matches any item in a list, e.g. country IN ('US','UK'). BETWEEN tests an inclusive range, e.g. age BETWEEN 18 AND 30. LIKE matches a text pattern using wildcards % (any string) and _ (single character).

  6. How do you filter for NULL values in SQL, and why can't you use = NULL?

    Use IS NULL or IS NOT NULL. You cannot use = NULL because NULL represents an unknown value; any comparison with NULL using = or <> yields UNKNOWN (not TRUE), so no rows would match.

  7. What does the ORDER BY clause do, and what is its default sort direction?

    ORDER BY sorts the result set by one or more columns. The default direction is ascending (ASC). Use DESC for descending order, e.g. ORDER BY sales DESC, name ASC.

  8. What does the LIMIT clause do in SQL?

    LIMIT restricts the number of rows returned by the query, e.g. LIMIT 10 returns at most 10 rows. Combined with ORDER BY it gives 'top N' results; OFFSET can skip rows for pagination.

  9. What does the DISTINCT keyword do in a SELECT statement?

    DISTINCT removes duplicate rows from the result set, returning only unique combinations of the selected columns. Example: SELECT DISTINCT country FROM customers returns each country once.

  10. What is a column alias in SQL, and how is it created?

    An alias is a temporary, readable name given to a column or expression in the result set, created with the AS keyword (AS is optional). Example: SELECT price * quantity AS total_cost. Table aliases work similarly, e.g. FROM customers AS c.

  11. What does the GROUP BY clause do in SQL?

    GROUP BY groups rows that share the same values in specified columns into summary rows, so aggregate functions can be applied per group. Example: SELECT country, COUNT(*) FROM customers GROUP BY country.

  12. What is the difference between the WHERE and HAVING clauses in SQL?

    WHERE filters individual rows before grouping and cannot use aggregate functions. HAVING filters groups after GROUP BY and can use aggregates. Example: HAVING COUNT(*) > 5 keeps only groups with more than 5 rows.

  13. List the five main SQL aggregate functions and what each computes.

    COUNT: number of rows/values. SUM: total of numeric values. AVG: arithmetic mean. MIN: smallest value. MAX: largest value. All operate over a group (or the whole table if no GROUP BY).

  14. How does COUNT(*) differ from COUNT(column_name) in SQL?

    COUNT(*) counts all rows including those with NULLs. COUNT(column_name) counts only rows where that column is not NULL. COUNT(DISTINCT column) counts distinct non-null values.

  15. What is the logical execution order of the main SQL clauses (FROM through ORDER BY)?

    FROM (and JOINs) → WHERE → GROUP BY → HAVING → SELECT → DISTINCT → ORDER BY → LIMIT. This is why aliases defined in SELECT usually can't be used in WHERE but can be used in ORDER BY.

  16. What does an INNER JOIN return?

    An INNER JOIN returns only the rows that have matching values in both tables based on the join condition. Rows with no match in either table are excluded.

  17. What is the difference between a LEFT JOIN and a RIGHT JOIN?

    A LEFT JOIN returns all rows from the left (first) table plus matching rows from the right, with NULLs where no match exists. A RIGHT JOIN returns all rows from the right (second) table plus matching rows from the left, with NULLs where no match exists.

  18. What does a FULL OUTER JOIN return?

    A FULL OUTER JOIN returns all rows from both tables: matched rows are combined, and unmatched rows from either side appear with NULLs for the missing side's columns.

  19. What is a CROSS JOIN, and how many rows does it produce?

    A CROSS JOIN returns the Cartesian product of two tables: every row of the first table paired with every row of the second. If the tables have $m$ and $n$ rows, the result has $m \times n$ rows.

  20. What is a self join in SQL, and when is it used?

    A self join is a join of a table to itself, using table aliases to distinguish the two copies. It is used for hierarchical or comparative data within one table, e.g. matching employees to their managers stored in the same employees table.

  21. What is the basic syntax to join two tables on a matching key in SQL?

    SELECT columns FROM tableA a INNER JOIN tableB b ON a.key = b.key. The ON clause specifies the matching condition; using aliases (a, b) qualifies which table each column comes from.

  22. What does the UNION operator do in SQL, and what are its requirements?

    UNION combines the result sets of two or more SELECT statements into one, stacking rows vertically. Each SELECT must have the same number of columns with compatible data types in the same order. UNION also removes duplicate rows.

  23. What is the difference between UNION and UNION ALL?

    UNION removes duplicate rows from the combined result (requiring a de-duplication step). UNION ALL keeps all rows including duplicates and is therefore faster because no duplicate check is performed.

  24. How does a UNION differ conceptually from a JOIN?

    A JOIN combines tables horizontally, adding columns by matching rows on a condition. A UNION combines queries vertically, stacking rows on top of each other; the queries must have compatible column structures.

  25. What is a subquery in SQL?

    A subquery (inner query) is a query nested inside another SQL statement. It can appear in the SELECT, FROM, or WHERE clause and provides a value, a list, or a derived table used by the outer query.

  26. What is the difference between a correlated and a non-correlated (self-contained) subquery?

    A non-correlated subquery runs independently once and passes its result to the outer query. A correlated subquery references columns from the outer query and is re-evaluated for each row the outer query processes, making it typically slower.

  27. When must you use IN (or ANY) versus = with a subquery in a WHERE clause?

    Use = only when the subquery is guaranteed to return a single value (one row, one column). Use IN (or ANY/ALL) when the subquery returns multiple values, e.g. WHERE id IN (SELECT id FROM orders).

  28. What is a Common Table Expression (CTE), and what keyword introduces it?

    A CTE is a named, temporary result set defined at the start of a query with the WITH keyword and referenced within that single statement. Syntax: WITH cte_name AS (SELECT ...) SELECT ... FROM cte_name. It improves readability of complex queries.

  29. What are two advantages of using a CTE over a nested subquery?

    (1) Readability/reusability: a CTE is named and can be referenced multiple times in the same query instead of repeating a subquery. (2) It allows recursion (recursive CTEs) for hierarchical data, which plain subqueries cannot do; it also lets you structure logic top-to-bottom.

  30. What is a recursive CTE used for?

    A recursive CTE references itself to process hierarchical or tree-structured data, such as organizational charts, bill-of-materials, or graph traversals. It has an anchor member (base case) combined via UNION ALL with a recursive member that repeats until no new rows are produced.

  31. In SQL, what is the difference between using EXISTS and IN with a subquery for filtering?

    IN compares a column's value against the list of values returned by the subquery. EXISTS returns TRUE as soon as the (usually correlated) subquery returns any row, stopping early. EXISTS is often more efficient for large subquery results and handles NULLs more predictably than IN.

Data Analytics Data Wrangling and SQL FAQ

What is in the Data Analytics Data Wrangling and SQL syllabus?

Data Analytics Data Wrangling and SQL is split into 6 chapters: Spreadsheets for Analysis, Relational Databases, SQL Fundamentals, SQL Aggregation and Joins, Advanced SQL and Data Cleaning and Preparation. Together they contain 27 topics.

How many chapters are in Data Analytics Data Wrangling and SQL?

6 chapters, containing 27 topics. The largest chapter is Data Cleaning and Preparation, with 6 topics.

Are there flashcards for Data Analytics Data Wrangling and SQL?

Yes — a 51-card Data Wrangling and SQL deck, printed in full in the flashcards section of this page and available in the Examius app with spaced repetition. The free plan covers one exam of your choice, including its flashcards; Examius Pro, a one-time purchase, unlocks every other exam and deck.