[LeetCode] SQL 50 / MYSQL / 1683. Invalid Tweets
2023. 11. 12. 22:05ㆍCoding Test & Algorithms/LeetCode-SQL
문제링크
https://leetcode.com/problems/invalid-tweets/description/
Invalid Tweets - LeetCode
Can you solve this real interview question? Invalid Tweets - Table: Tweets +----------------+---------+ | Column Name | Type | +----------------+---------+ | tweet_id | int | | content | varchar | +----------------+---------+ tweet_id is the primary key (c
leetcode.com
문제
소스코드
# Write your MySQL query statement below
SELECT tweet_id
FROM Tweets
WHERE LENGTH(content) > 15;
MYSQL 에서 문자열의 길이를 가져오는 함수는 LEN() 함수가 아니라 LENGTH() 함수라는 점에 유의하면 금방 풀릴 것이다. (정확히는 문자열이 차지하는 바이트 수를 세는 함수이다.)
'Coding Test & Algorithms > LeetCode-SQL' 카테고리의 다른 글
[LeetCode] SQL 50 / ORACLE / 1068. Product Sales Analysis 1 (1) | 2024.01.06 |
---|---|
[LeetCode] SQL 50 / Oracle / 1378. Replace Employee ID With The Unique Identifier (0) | 2024.01.06 |
[LeetCode] SQL 50 / MYSQL / 1148. Article View I (0) | 2023.11.12 |
[LeetCode] SQL 50 / MYSQL / 595.Big Countries (0) | 2023.11.12 |
[LeetCode] SQL 50 / MYSQL / 584. Find Customer Referee (0) | 2023.11.12 |