File tree Expand file tree Collapse file tree 1 file changed +44
-0
lines changed Expand file tree Collapse file tree 1 file changed +44
-0
lines changed Original file line number Diff line number Diff line change 1+ 1667 . Fix Names in a Table
2+ Solved
3+ Easy
4+ Topics
5+ Companies
6+ SQL Schema
7+ Pandas Schema
8+ Table: Users
9+
10+ + -- --------------+---------+
11+ | Column Name | Type |
12+ + -- --------------+---------+
13+ | user_id | int |
14+ | name | varchar |
15+ + -- --------------+---------+
16+ user_id is the primary key (column with unique values ) for this table.
17+ This table contains the ID and the name of the user. The name consists of only lowercase and uppercase characters.
18+
19+
20+ Write a solution to fix the names so that only the first character is uppercase and the rest are lowercase.
21+
22+ Return the result table ordered by user_id.
23+
24+ The result format is in the following example.
25+
26+
27+
28+ Example 1 :
29+
30+ Input:
31+ Users table:
32+ + -- -------+-------+
33+ | user_id | name |
34+ + -- -------+-------+
35+ | 1 | aLice |
36+ | 2 | bOB |
37+ + -- -------+-------+
38+ Output:
39+ + -- -------+-------+
40+ | user_id | name |
41+ + -- -------+-------+
42+ | 1 | Alice |
43+ | 2 | Bob |
44+ + -- -------+-------+
You can’t perform that action at this time.
0 commit comments