Session Ready
Exercise

Using a fill-in value

The sedan body type is the most frequently occurring vehicle_body_type in the sample parking violations. For this reason, you propose changing all NULL-valued vehicle_body_type records in the parking_violations table to SDN. Discussions with your team result in a decision to not use one of the existing values as a fill-in value. The body type can be determined by looking up the vehicle using its license plate number. This value is present in most parking_violation records. Rather than using the most frequent value to replace NULL vehicle_body_type values, a placeholder value of Unknown will be used. The actual body type will be updated as license plate lookup data is gathered.

In this exercise, you will replace NULL vehicle_body_type values with the string Unknown.

Instructions
100 XP
  • Use COALESCE() to replace a vehicle_body_type that is NULL with the string value Unknown in the parking_violation table.