<aside> 💡
This project identifies invalid tweets from a social media database. A tweet is considered invalid if the length of its content exceeds 15 characters. The solution demonstrates the use of SQL functions to process text data and apply conditional filtering.
</aside>
A tweet is invalid if the length of its content is strictly greater than 15.
The task is to return the tweet_id of all invalid tweets.
The query uses the LENGTH() function to calculate the number of characters in the content column and filters rows where the length exceeds 15.
SELECT
tweet_id
FROM
Tweets
WHERE
LENGTH(content) > 15;
LENGTH(content) calculates the number of characters in the content column for each tweet.WHERE LENGTH(content) > 15 filters tweets where the character count exceeds 15.tweet_id of the filtered tweets is returned as the result.