{ "data": { "question": { "questionId": "3711", "questionFrontendId": "3374", "boundTopicId": null, "title": "First Letter Capitalization II", "titleSlug": "first-letter-capitalization-ii", "content": "
Table: user_content
\n+-------------+---------+\n| Column Name | Type |\n+-------------+---------+\n| content_id | int |\n| content_text| varchar |\n+-------------+---------+\ncontent_id is the unique key for this table.\nEach row contains a unique ID and the corresponding text content.\n\n\n
Write a solution to transform the text in the content_text
column by applying the following rules:
-
, both parts should be capitalized (e.g., top-rated → Top-Rated)Return the result table that includes both the original content_text
and the modified text following the above rules.
The result format is in the following example.
\n\n\n
Example:
\n\nInput:
\n\nuser_content table:
\n\n\n+------------+---------------------------------+\n| content_id | content_text |\n+------------+---------------------------------+\n| 1 | hello world of SQL |\n| 2 | the QUICK-brown fox |\n| 3 | modern-day DATA science |\n| 4 | web-based FRONT-end development |\n+------------+---------------------------------+\n\n\n
Output:
\n\n\n+------------+---------------------------------+---------------------------------+\n| content_id | original_text | converted_text |\n+------------+---------------------------------+---------------------------------+\n| 1 | hello world of SQL | Hello World Of Sql |\n| 2 | the QUICK-brown fox | The Quick-Brown Fox |\n| 3 | modern-day DATA science | Modern-Day Data Science |\n| 4 | web-based FRONT-end development | Web-Based Front-End Development |\n+------------+---------------------------------+---------------------------------+\n\n\n
Explanation:
\n\nMySQL 8.0
.
mssql server 2019
.
Oracle Sql 11.2
.
Python 3.10 with Pandas 2.2.2 and NumPy 1.26.4
\"], \"postgresql\": [\"PostgreSQL\", \"PostgreSQL 16
\"]}", "libraryUrl": null, "adminUrl": null, "challengeQuestion": null, "__typename": "QuestionNode" } } }