Double space method
* Inspired by [Rolex_hehehe](https://leetcode.com/problems/first-letter-capitalization-ii/solutions/6112910/2-simple-solutions-beat-100-just-replace-string-split-string-agg)\n# Code\n```postgresql []\nwith words as (\n    -- turn - into two spaces, so the string_to_array will have an empty string at hyphen part\n    select\n        content_id,\n        content_text as "original_text",\n        unnest(string_to_array(replace(content_text, \'-\', \'  \'), \' \')) as "word"\n    from user_content\n), upp as (\n    -- turn first chr to upper, the rest to lower case -> merge them back\nselect\n    content_id,\n    original_text,\n    string_agg(upper(left(word, 1)) || lower(substring(word from 2)), \' \') as "converted_text" \nfrom words\ngroup by content_id, original_text\n)\n-- turn double space back to hyphen\nselect\n    content_id, \n    original_text,\n    replace(converted_text, \'  \', \'-\') as "converted_text"\nfrom upp\norder by 1\n```
['PostgreSQL']