In a star schema, which table typically contains the measurable, quantitative data for analysis?
Think about where the numbers you want to analyze are stored.
The fact table stores measurable data such as sales amounts or quantities. Dimension tables provide context like dates or product details.
Which of the following SQL table structures best represents a star schema for sales data?
Star schema uses a central fact table connected to dimension tables.
Star schema organizes data with a central fact table linked to dimension tables, simplifying queries and improving performance.
Given a fact table 'Sales' with a column 'Amount', which DAX measure correctly calculates the total sales amount?
Total Sales = SUM(Sales[Amount])To get total sales, add up all amounts.
SUM aggregates the total of the Amount column. COUNT counts rows, AVERAGE finds mean, SUMX sums an expression.
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?
Think about showing changes over time by category.
A line chart effectively shows trends over time for different categories, making it ideal for this data.
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?
Check which columns should be in GROUP BY when using aggregation.
Grouping by Sales.Amount breaks aggregation because Amount is a measure. Only group by Product.Name to sum amounts correctly.