MySQL 풀이 | Invalid Tweets

2025. 1. 22. 19:38·SQL

문제 1.  Invalid Tweets

Write a solution to find the IDs of the invalid tweets. The tweet is invalid if the number of characters used in the content of the tweet is strictly greater than 15.
Return the result table in any order.
The result format is in the following example.

Example 1:

Input: 
Tweets table:
+----------+-----------------------------------+
| tweet_id | content                           |
+----------+-----------------------------------+
| 1        | Let us Code                       |
| 2        | More than fifteen chars are here! |
+----------+-----------------------------------+
Output: 
+----------+
| tweet_id |
+----------+
| 2        |
+----------+
Explanation: 
Tweet 1 has length = 11. It is a valid tweet.
Tweet 2 has length = 33. It is an invalid tweet.

https://leetcode.com/problems/invalid-tweets/description/


💡 문제 풀이 

`내 풀이`

select tweet_id
from Tweets
where length(content) > 15

 

출력결과

'SQL' 카테고리의 다른 글
  • MySQL 풀이 | Product Sales Analysis I
  • MySQL 풀이 | Replace Employee ID With The Unique Identifier
  • MySQL 풀이 | Article Views I
  • MySQL 풀이 | Big Countries
초담
초담
4년차 마케터입니다
  • 초담
    그로스마케터의 기록
    초담
  • 전체
    오늘
    어제
  • 글쓰기 관리
    • 분류 전체보기 (117)
      • Data Analytics Project (3)
      • SQL (55)
      • Python (43)
      • GA4 (0)
      • Tableau (8)
      • 아티클 스터디 (7)
  • 인기 글

  • 최근 글

  • hELLO· Designed By정상우.v4.10.2
초담
MySQL 풀이 | Invalid Tweets
상단으로

티스토리툴바