0
0
SQLquery~20 mins

Star schema concept in SQL - Practice Problems & Coding Challenges

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
Star Schema Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🧠 Conceptual
intermediate
2:00remaining
Identify the Fact Table in a Star Schema

In a star schema, which table typically contains the measurable, quantitative data for analysis?

AStaging table
BFact table
CLookup table
DDimension table
Attempts:
2 left
💡 Hint

Think about where the numbers you want to analyze are stored.

data_modeling
intermediate
2:00remaining
Choose the Correct Star Schema Structure

Which of the following SQL table structures best represents a star schema for sales data?

AOne large table with all sales and product details combined
BMultiple normalized tables with many-to-many relationships between sales and products
CA central sales fact table linked to separate product, customer, and date dimension tables
DA single table with repeated product and customer information for each sale
Attempts:
2 left
💡 Hint

Star schema uses a central fact table connected to dimension tables.

dax_lod_result
advanced
2:00remaining
Calculate Total Sales Using DAX in a Star Schema

Given a fact table 'Sales' with a column 'Amount', which DAX measure correctly calculates the total sales amount?

SQL
Total Sales = SUM(Sales[Amount])
ATotal Sales = SUMX(Sales, Sales[Quantity])
BTotal Sales = COUNT(Sales[Amount])
CTotal Sales = AVERAGE(Sales[Amount])
DTotal Sales = SUM(Sales[Amount])
Attempts:
2 left
💡 Hint

To get total sales, add up all amounts.

visualization
advanced
2:00remaining
Best Visualization for Star Schema Sales Data

You have sales data in a star schema with dimensions for Product, Date, and Customer. Which visualization best shows total sales by product category over time?

ALine chart showing sales trends by product category over months
BTable listing all sales transactions
CPie chart showing sales by product category
DScatter plot of sales amount vs. customer age
Attempts:
2 left
💡 Hint

Think about showing changes over time by category.

🔧 Debug
expert
2:30remaining
Identify the Error in Star Schema SQL Query

Consider this SQL query joining a fact table 'Sales' with dimension 'Product' to get total sales per product name:

SELECT Product.Name, SUM(Sales.Amount) AS TotalSales
FROM Sales
JOIN Product ON Sales.ProductID = Product.ID
GROUP BY Product.Name, Sales.Amount;

What is the error in this query?

AGrouping by Sales.Amount causes incorrect aggregation
BMissing WHERE clause to filter sales data
CJOIN condition uses wrong columns
DSUM function cannot be used with GROUP BY
Attempts:
2 left
💡 Hint

Check which columns should be in GROUP BY when using aggregation.