PhraseryPhrasery homeGet Phrasery
Data & SQL21 categories

Plan the cleanup of a messy column

Free-text data that half-works and needs to become reliable.

Longdata-qualitycleaningSQL
Below is a sample of a messy column. Plan its cleanup.

1. Classify what you see into distinct patterns, with a count or share for each, and give an example of each pattern.
2. Name the ambiguous cases where you genuinely cannot tell the intended value, and say what a human needs to decide.
3. Propose a normalisation order, cheapest and safest first: trim, case-fold, strip punctuation, collapse whitespace, then the harder mappings.
4. Give the SQL or regex for each step, and for each, an example of a value it would wrongly change.
5. Recommend whether to clean on read, clean on write, or add a cleaned column alongside the original. Give one answer.

Never silently discard values you cannot parse. Route them to a quarantine bucket and tell me how to count it.

Sample values:
What the column is supposed to hold:

Making it yours

  • Paste your own material where the prompt asks for it. Everything above that line is instruction, not content.
  • Delete any rule that does not apply to you. A shorter prompt that fits beats a thorough one that does not.
  • If the answer comes back vague, add a line saying what you do not want. Constraints work better than encouragement.

Schema and data quality. Designing tables, migrating them without breaking live code, and cleaning what you have been handed.

Related prompts

Keep this one

Phrasery saves prompts with a right-click and puts them back the same way. Add this to your own library in one click.

Add to your browser โ€” free