Turn a «100.50» string back into a number
The value column in metrics was originally created as a «string up to 20 chars» — leftover from a CSV import. Inside are numbers stored as strings: «100.50», «250.00», «999.99».
Doing math on them in SQL is painful — time to convert the column to a proper numeric type. Build metrics with id (primary key) and value (string up to 20 chars), insert three numeric strings, then change the column type to a number with two decimal places — you'll need an explicit cast for the conversion. If the data contained a non-number, the type change would fail; ours is clean.
Just CREATE/ALTER/DROP — no trailing SELECT needed.
Sign in to see submission history
Sign inSign in to use AI Mentor
Sign inNo starting schema
This task starts with no tables — you'll create them via CREATE TABLE.