Deals Of The Week - hours only!Up to 80% off on all courses and bundles.-Close
Introduction
Conversion rates
5. Global lifetime conversion percentage
Time to first order
Conversion charts
Summary

Instruction

Great! We can also express the conversion rate as a percentage. Take a look:

SELECT ROUND(COUNT(FirstOrderId) * 100.0 / COUNT(*), 2) AS ConversionRate
FROM Customers;

As you can see, we multiplied the numerator by 100.0 to get a percentage. Note that 100.0 is a float number. Multiplying the numerator by 100.0 means the whole expression will use float division. That's why we didn't have to explicitly use CAST() this time.

Exercise

Modify the template which contains the code from the previous exercise, so that it shows the conversion rate as a percentage. Round it to two decimal places.

Stuck? Here's a hint!

Multiply the numerator by 100.0.