AnalystPath

Overlong Support Messages

SQLEasyJunior level~15 min

Problem

Table: `support_message`

| Column Name | Type |
|---|---|
| message_id | int |
| body | varchar |

`message_id` is the primary key. `body` is the text a customer typed into a help-desk chat box.

The chat box only allows short messages. A message is considered **too long** when the number of characters in its `body` is **strictly greater than 20**. Return the `message_id` of every message that is too long.

Tables

Example rows — the live problem includes the full dataset.

support_message
message_idbody
1Hi there
2My order has not arrived yet please help
3Thanks for the help!

Expected output

Your answer should return 1 row with the columns message_id.

Starter code (SQL)

SELECT *
FROM support_message;

Solve this SQL question free

Write SQL and run it instantly in your browser — even on your phone. No signup needed to try.

Solution & explanation

Create a free account to unlock the optimal solution, a step-by-step explanation, and the hidden test cases that grade your answer.

Sign up free to unlock

Related SQL questions