Leetcode Problem 1667. Fix Names in a Table

1667. Fix Names in a Table

Leetcode Solutions

Normalizing User Names

  1. Use the SUBSTRING function to separate the first character of the 'name' field.
  2. Use the UPPER function to convert the first character to uppercase.
  3. Use the SUBSTRING function again to separate the rest of the 'name' field starting from the second character.
  4. Use the LOWER function to convert the rest of the 'name' to lowercase.
  5. Use the CONCAT function to combine the uppercase first character with the lowercase rest of the name.
  6. Use the ORDER BY clause to sort the results by 'user_id'.
erDiagram
    Users {
        int user_id
        varchar name
    }

Capitalizing User Names with Pandas

Ask Question

Programming Language
image/screenshot of info(optional)
Full Screen
Loading...

Suggested Answer

Answer
Full Screen
Copy Answer Code
Loading...