Can an INNER JOIN returning more records than exist in a table be right? Jeff thought it was a bug. Our chat shows why it is possible and natural.
Slowly Changing Dimension Quiz: Type 1 or Type 2?
This Slowly Changing Dimension Quiz asks which type to use when a customer moves from Denver to Austin and sales before the move must stay under Denver. The answer is Type 2. A tested script runs Type 1 and Type 2 side by side, checks the move date and shows both reports.
Table Partitioning Quiz: When Does It Make a Query Faster?
This Table Partitioning Quiz asks whether a query for last month runs faster once a sales table is partitioned by month. The answer is only when the filter lets SQL Server skip partitions. A tested script shows the partition count, the reads, and a partition SWITCH.
Query Store Quiz: Where Is Last Week’s Slow Query?
This Query Store Quiz starts with a slow query from last week and a plan cache that restarted empty. The answer is Query Store, which keeps plans and run times inside the database. A tested T-SQL script finds the query, its plan and its duration.
Reclaiming Space Quiz: Does Deleting Rows Shrink the File?
This Reclaiming Space Quiz asks what happens to the data file after you delete half the rows of a big table. The file keeps its size, and the space stays free inside it. A tested script shows the numbers, then what a shrink costs.
Date Functions Quiz: What Does DATEDIFF Count?
This Date Functions Quiz asks what DATEDIFF returns for two dates one day apart, when the unit is year. The answer is 1, because DATEDIFF counts boundaries crossed. A tested script shows an age calculation that works, plus DATETRUNC and EOMONTH.







