Your question is SQL Name Formatting Query. Start with the requirements and the one table on the right.
Run and submit as often as you like. When you're ready, talk me through your approach or go straight to the code.
Optum's member directory export stores a member's name in a single full_name column. Write a PostgreSQL query that formats each valid name for display in the form Last, First.
full_name into first and last name components.formatted_name, preserve missing or blank names as NULL, and sort alphabetically with null values last.Assume each populated name contains a first name and a last name separated by whitespace. Extra spaces should not affect the result.
| Column | Type | Description |
|---|---|---|
| member_idPK | INTEGER | Unique member identifier |
| full_name | VARCHAR(150) | Member's first and last name |