Instruction
It's time to wrap things up! Let's review the concepts we've covered in this part:
- We can calculate multiple metrics for a given business object using multiple aggregate functions in a single query.
- We can use
COUNT(CASE WHEN ...)multiple times in a single query to count objects in multiple groups. - When calculating percentages, remember to cast one of the counts to the float type. You can also use the
ROUND()function, like this:ROUND(CountShipped / CAST(CountAll AS float) * 100, 2) AS ShippedRatio
All right, how about a quiz before we move on?
Exercise
Click to continue.



