2 solutions || use: cross apply - string_split - replace - upper - lower - string_agg
IntuitionApproachComplexity
Time complexity:

Space complexity:
Code mssqlCode POSTGRESQL
# Intuition
<!-- Describe your first thoughts on how to solve this problem. -->

# Approach
<!-- Describe your approach to solving the problem. -->

# Complexity
- Time complexity:
<!-- Add your time complexity here, e.g. $$O(n)$$ -->

- Space complexity:
<!-- Add your space complexity here, e.g. $$O(n)$$ -->

# Code mssql
```mssql []
-- Write your PostgreSQL query statement below

;WITH CTE AS(
SELECT 
	*,'REPL' = REPLACE(content_text,'-','- ')
FROM 
user_content
),CTE1 AS(
SELECT 
	*,
	'RESULT' = UPPER(LEFT(value, 1)) +'' + LOWER(SUBSTRING(VALUE, 2, LEN(VALUE) - 1))
FROM 
	CTE 
CROSS APPLY STRING_SPLIT(REPL, ' ') 
)
SELECT 
content_id,
content_text original_text  ,                 
REPLACE(STRING_AGG(RESULT,' '),'- ','-') converted_text                  
FROM
CTE1
GROUP BY content_id,content_text
ORDER BY content_id
```
# Code POSTGRESQL
```POSTGRESQL []
-- Write your PostgreSQL query statement below
;WITH CTE AS(
SELECT 
	*,REPLACE(content_text,'-','- ') as REPL
FROM 
user_content
),CTE1 AS(
SELECT 
	*,
	 UPPER(LEFT(values, 1)) || '' || LOWER(SUBSTRING(values, 2, LENGTH(values) - 1))RESULT
FROM 
	CTE
CROSS JOIN LATERAL 
			unnest(string_to_array(REPL, ' ')) as values
)
SELECT 
content_id,
content_text original_text  ,                 
REPLACE(STRING_AGG(RESULT,' '),'- ','-') converted_text                  
FROM
CTE1
GROUP BY content_id,content_text
ORDER BY content_id
```

['MS SQL Server', 'PostgreSQL']