๐Ÿ‘ค My Profile (Player)๐Ÿ  Home๐Ÿ—‚๏ธ Categories๐ŸŽฎ Play Game Modes๐Ÿ‘‘ Live Party Room๐Ÿ—‚๏ธ Mistakes & Flashcardsโšก Flash Quiz Shorts๐Ÿ“‹ Quiz History๐Ÿ… Achievements๐Ÿ† Daily Challenge๐Ÿค– AI Generator๐Ÿ“ Quiz Blog
๐Ÿ“Š
Questions & Answers

30 Data Science & SQL Quiz Questions & Answers

SQL queries, Python Pandas, machine learning models, data analytics, and statistics.

๐ŸŽฏ Play the Data Science & SQL Quiz โ€” It's Free

Below are 30 data science & sql quiz questions with the correct answer and a short explanation for each, grouped from easy to hard. Use them to revise, host a quiz night, or prepare for competitions.

Answers are hidden so you can test yourself: tap any question to reveal its answer. To read or print them all, press Show all answers.

Easy Data Science & SQL Questions

10 questions

Warm-up questions on the basics of data science & sql, good for beginners and younger players.

  1. 1

    What does SQL stand for in data management?

    โœ… Structured Query Language

    SQL (Structured Query Language) is the standard domain-specific language used to manage and query relational databases.

  2. 2

    Which SQL keyword is used to extract data from a database table?

    โœ… SELECT

    The `SELECT` statement is used to fetch data from one or more database tables.

  3. 3

    In Data Science, which Python library is most famous for dataframe manipulation and tabular data analysis?

    โœ… Pandas

    Pandas provides high-performance DataFrames and tools for analyzing structured numerical and categorical tables.

  4. 4

    Which SQL clause is used to filter query results based on specified conditions?

    โœ… WHERE

    The `WHERE` clause filters rows before any grouping or aggregation takes place.

  5. 5

    What type of chart is best suited for demonstrating trends over continuous time intervals?

    โœ… Line Chart

    Line charts effectively illustrate continuous trends and fluctuations over time.

  6. 6

    In statistics, how is the 'Mean' of a numerical dataset calculated?

    โœ… The sum of all values divided by the count of values

    The mean (arithmetic average) equals the total sum divided by the number of observations.

  7. 7

    What does CSV stand for in tabular data files?

    โœ… Comma-Separated Values

    CSV files store tabular data in plain text, with each line representing a record separated by commas.

  8. 8

    In statistics, what is the 'Median' of a dataset?

    โœ… The middle score when values are arranged in ascending numerical order

    The median represents the exact 50th percentile mark separating the higher half from the lower half of data.

  9. 9

    What is Data Cleaning (or Data Wrangling)?

    โœ… Detecting and correcting corrupt, incomplete, inaccurate, or duplicate data entries

    Data cleaning prepares raw data for analysis by addressing missing values, outliers, structural errors, and duplicates.

  10. 10

    What is A/B Testing in data science and experimentation?

    โœ… A randomized experiment comparing two variants (A and B) to test statistical significance of a change

    A/B testing uses hypothesis testing to measure whether a variant produces a statistically significant change in user behavior.

Medium Data Science & SQL Questions

12 questions

Questions that go beyond the basics. A good test for regular quiz players.

  1. 11

    What is Machine Learning?

    โœ… A branch of AI where systems learn pattern rules from data without explicit programming

    Machine Learning uses algorithms that discover patterns in historical data to make automated predictions.

  2. 12

    Which core Python library provides fast multi-dimensional array operations and matrix math?

    โœ… NumPy

    NumPy (Numerical Python) is the foundational package for scientific computing in Python, providing n-dimensional arrays.

  3. 13

    Which SQL clause sorts the returned records in ascending or descending order?

    โœ… ORDER BY

    The `ORDER BY` clause sorts result sets by specified columns (ASC by default, or DESC).

  4. 14

    In SQL, which clause is required alongside aggregate functions like COUNT(), SUM(), or AVG() to group results by column?

    โœ… GROUP BY

    The `GROUP BY` statement groups rows that have the same values in specified columns into summary rows.

  5. 15

    What is 'Overfitting' in machine learning models?

    โœ… When a model memorizes training data noise and fails to generalize on new unseen data

    Overfitting occurs when a model learns training data details and noise so closely that it negatively impacts new test data performance.

  6. 16

    Which machine learning paradigm groups unlabeled data points together based on inherent feature similarities?

    โœ… Unsupervised Learning (Clustering)

    Unsupervised learning (e.g., K-Means clustering) analyzes unlabeled data to uncover hidden patterns or natural groupings.

  7. 17

    What is a Confusion Matrix used for in classification data science?

    โœ… A table showing True Positives, False Positives, True Negatives, and False Negatives to evaluate model accuracy

    A confusion matrix reports performance of a classification model, calculating precision, recall, and F1-score.

  8. 18

    Which SQL database constraint uniquely identifies each row in a table and cannot contain NULL values?

    โœ… PRIMARY KEY

    A PRIMARY KEY constraint enforces unique identification for table records and strictly prohibits NULL values.

  9. 19

    What is a Box Plot (Box-and-Whisker plot) useful for in exploratory data analysis?

    โœ… Visualizing median, quartiles, interquartile range (IQR), and identifying data outliers

    Box plots provide a 5-number visual summary (Min, Q1, Median, Q3, Max) and highlight extreme outliers.

  10. 20

    What is Gradient Descent in machine learning optimization?

    โœ… An algorithm that iteratively adjusts model parameters to minimize a cost/loss function

    Gradient descent calculates the gradient of the loss function to update model weights in the direction of steepest descent.

  11. 21

    What is a Random Forest in machine learning?

    โœ… An ensemble learning method that constructs a multitude of decision trees and merges their predictions

    Random Forest combines decision trees trained on random data subsets (bagging) to improve accuracy and control overfitting.

  12. 22

    What is Normalization (Min-Max Scaling) in feature engineering?

    โœ… Rescaling numerical feature values into a fixed range, typically between 0 and 1

    Min-Max scaling transforms features so that all values fit within [0, 1], preventing features with larger scales from dominating algorithms.

Hard Data Science & SQL Questions

8 questions

The toughest data science & sql questions in our bank, for experts and quiz-night finalists.

  1. 23

    What is the difference between INNER JOIN and LEFT JOIN in SQL?

    โœ… INNER JOIN returns only matching rows; LEFT JOIN returns all rows from the left table plus matched rows

    INNER JOIN selects records with matching values in both tables. LEFT JOIN retains all records from the left table even if unmatched.

  2. 24

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

    โœ… WHERE filters individual rows before grouping; HAVING filters aggregate groups after GROUP BY

    WHERE filters rows before aggregation occurs. HAVING filters summary rows after GROUP BY aggregations are calculated.

  3. 25

    What is the Bias-Variance Tradeoff in machine learning models?

    โœ… Balancing underfitting caused by high bias against overfitting caused by high variance

    High bias causes underfitting (over-simplified models), while high variance causes overfitting (sensitivity to noise); tuning balances both.

  4. 26

    In advanced SQL analytics, what is a Window Function (e.g., `ROW_NUMBER() OVER(PARTITION BY...)`)?

    โœ… A function performing calculations across a set of table rows related to the current row without collapsing them into a single row

    SQL Window functions compute values over row partitions while preserving individual row identity in the output.

  5. 27

    What does the p-value represent in statistical hypothesis testing?

    โœ… The probability of obtaining results at least as extreme as observed, assuming the null hypothesis is true

    A low p-value (typically โ‰ค 0.05) indicates that the observed data is unlikely under the null hypothesis, leading to rejection of the null.

  6. 28

    What is Principal Component Analysis (PCA)?

    โœ… A linear dimensionality reduction technique that transforms correlated features into uncorrelated principal components

    PCA reduces high-dimensional data feature spaces while retaining maximum variance across principal orthogonal axes.

  7. 29

    In SQL databases, what does the `COALESCE()` function evaluate to?

    โœ… The first non-NULL value among its argument list

    `COALESCE(val1, val2, val3)` inspects arguments in order and returns the first argument that is not NULL.

  8. 30

    In SQL, what is a Common Table Expression (CTE) defined using the `WITH` clause?

    โœ… A temporary named result set existing only within the execution scope of a query

    CTEs simplify complex queries by creating temporary named result sets that can be referenced within SELECT, INSERT, or UPDATE statements.

Ready to Test Yourself?

How many did you get right? Now try them against the clock. The interactive Data Science & SQL quiz picks questions at random, adds a countdown timer, and tracks your score.

๐Ÿ“Š Play Data Science & SQL Quiz Now