1
0
mirror of https://gitee.com/coder-xiaomo/leetcode-problemset synced 2025-09-05 23:41:41 +08:00
Code Issues Projects Releases Wiki Activity GitHub Gitee
Files
leetcode-problemset/leetcode-cn/originData/invalid-tweets.json
2025-01-09 20:29:41 +08:00

89 lines
7.8 KiB
JSON
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

{
"data": {
"question": {
"questionId": "1827",
"questionFrontendId": "1683",
"categoryTitle": "Database",
"boundTopicId": 517777,
"title": "Invalid Tweets",
"titleSlug": "invalid-tweets",
"content": "<p>Table: <code>Tweets</code></p>\n\n<pre>\n+----------------+---------+\n| Column Name | Type |\n+----------------+---------+\n| tweet_id | int |\n| content | varchar |\n+----------------+---------+\ntweet_id is the primary key (column with unique values) for this table.\ncontent consists of characters on an American Keyboard, and no other special characters.\nThis table contains all the tweets in a social media app.\n</pre>\n\n<p>&nbsp;</p>\n\n<p>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 <strong>strictly greater</strong> than <code>15</code>.</p>\n\n<p>Return the result table in <strong>any order</strong>.</p>\n\n<p>The result format is in the following example.</p>\n\n<p>&nbsp;</p>\n<p><strong class=\"example\">Example 1:</strong></p>\n\n<pre>\n<strong>Input:</strong> \nTweets table:\n+----------+-----------------------------------+\n| tweet_id | content |\n+----------+-----------------------------------+\n| 1 | Let us Code |\n| 2 | More than fifteen chars are here! |\n+----------+-----------------------------------+\n<strong>Output:</strong> \n+----------+\n| tweet_id |\n+----------+\n| 2 |\n+----------+\n<strong>Explanation:</strong> \nTweet 1 has length = 11. It is a valid tweet.\nTweet 2 has length = 33. It is an invalid tweet.\n</pre>\n",
"translatedTitle": "无效的推文",
"translatedContent": "<p>表:<code>Tweets</code></p>\n\n<pre>\n+----------------+---------+\n| Column Name | Type |\n+----------------+---------+\n| tweet_id | int |\n| content | varchar |\n+----------------+---------+\n在 SQL 中tweet_id 是这个表的主键。\ncontent 只包含美式键盘上的字符,不包含其它特殊字符。\n这个表包含某社交媒体 App 中所有的推文。</pre>\n\n<p>&nbsp;</p>\n\n<p>查询所有无效推文的编号ID。当推文内容中的字符数<strong>严格大于</strong> <code>15</code> 时,该推文是无效的。</p>\n\n<p>以<strong>任意顺序</strong>返回结果表。</p>\n\n<p>查询结果格式如下所示:</p>\n\n<p>&nbsp;</p>\n\n<p><strong>示例 1</strong></p>\n\n<pre>\n<strong>输入:</strong>\nTweets 表:\n+----------+----------------------------------+\n| tweet_id | content |\n+----------+----------------------------------+\n| 1 | Vote for Biden |\n| 2 | Let us make America great again! |\n+----------+----------------------------------+\n\n<strong>输出:</strong>\n+----------+\n| tweet_id |\n+----------+\n| 2 |\n+----------+\n<strong>解释:</strong>\n推文 1 的长度 length = 14。该推文是有效的。\n推文 2 的长度 length = 32。该推文是无效的。\n</pre>\n",
"isPaidOnly": false,
"difficulty": "Easy",
"likes": 70,
"dislikes": 0,
"isLiked": null,
"similarQuestions": "[]",
"contributors": [],
"langToValidPlayground": "{\"cpp\": false, \"java\": false, \"python\": false, \"python3\": false, \"mysql\": false, \"mssql\": false, \"oraclesql\": false, \"c\": false, \"csharp\": false, \"javascript\": false, \"typescript\": false, \"bash\": false, \"php\": false, \"swift\": false, \"kotlin\": false, \"dart\": false, \"golang\": false, \"ruby\": false, \"scala\": false, \"html\": false, \"pythonml\": false, \"rust\": false, \"racket\": false, \"erlang\": false, \"elixir\": false, \"pythondata\": false, \"react\": false, \"vanillajs\": false, \"postgresql\": false, \"cangjie\": false}",
"topicTags": [
{
"name": "Database",
"slug": "database",
"translatedName": "数据库",
"__typename": "TopicTagNode"
}
],
"companyTagStats": null,
"codeSnippets": [
{
"lang": "MySQL",
"langSlug": "mysql",
"code": "# Write your MySQL query statement below",
"__typename": "CodeSnippetNode"
},
{
"lang": "MS SQL Server",
"langSlug": "mssql",
"code": "/* Write your T-SQL query statement below */",
"__typename": "CodeSnippetNode"
},
{
"lang": "Oracle",
"langSlug": "oraclesql",
"code": "/* Write your PL/SQL query statement below */",
"__typename": "CodeSnippetNode"
},
{
"lang": "Pandas",
"langSlug": "pythondata",
"code": "import pandas as pd\n\ndef invalid_tweets(tweets: pd.DataFrame) -> pd.DataFrame:\n ",
"__typename": "CodeSnippetNode"
},
{
"lang": "PostgreSQL",
"langSlug": "postgresql",
"code": "-- Write your PostgreSQL query statement below",
"__typename": "CodeSnippetNode"
}
],
"stats": "{\"totalAccepted\": \"101.3K\", \"totalSubmission\": \"119.1K\", \"totalAcceptedRaw\": 101349, \"totalSubmissionRaw\": 119103, \"acRate\": \"85.1%\"}",
"hints": [],
"solution": null,
"status": null,
"sampleTestCase": "{\"headers\":{\"Tweets\":[\"tweet_id\",\"content\"]},\"rows\":{\"Tweets\":[[1,\"Let us Code\"],[2,\"More than fifteen chars are here!\"]]}}",
"metaData": "{\"mysql\":[\"Create table If Not Exists Tweets(tweet_id int, content varchar(50))\"],\"mssql\":[\"Create table Tweets(tweet_id int, content varchar(50))\"],\"oraclesql\":[\"Create table Tweets(tweet_id int, content varchar(50))\"],\"database\":true,\"name\":\"invalid_tweets\",\"pythondata\":[\"Tweets = pd.DataFrame([], columns=['tweet_id', 'content']).astype({'tweet_id':'Int64', 'content':'object'})\"],\"postgresql\":[\"Create table If Not Exists Tweets(tweet_id int, content varchar(50))\"],\"database_schema\":{\"Tweets\":{\"tweet_id\":\"INT\",\"content\":\"VARCHAR(50)\"}}}",
"judgerAvailable": true,
"judgeType": "large",
"mysqlSchemas": [
"Create table If Not Exists Tweets(tweet_id int, content varchar(50))",
"Truncate table Tweets",
"insert into Tweets (tweet_id, content) values ('1', 'Let us Code')",
"insert into Tweets (tweet_id, content) values ('2', 'More than fifteen chars are here!')"
],
"enableRunCode": true,
"envInfo": "{\"mysql\":[\"MySQL\",\"<p>\\u7248\\u672c\\uff1a<code>MySQL 8.0<\\/code><\\/p>\"],\"mssql\":[\"MS SQL Server\",\"<p>mssql server 2019.<\\/p>\"],\"oraclesql\":[\"Oracle\",\"<p>Oracle Sql 11.2.<\\/p>\"],\"pythondata\":[\"Pandas\",\"<p>Python 3.10 with Pandas 2.2.2 and NumPy 1.26.4<\\/p>\"],\"postgresql\":[\"PostgreSQL\",\"<p>PostgreSQL 16<\\/p>\"]}",
"book": null,
"isSubscribed": false,
"isDailyQuestion": false,
"dailyRecordStatus": null,
"editorType": "CKEDITOR",
"ugcQuestionId": null,
"style": "LEETCODE",
"exampleTestcases": "{\"headers\":{\"Tweets\":[\"tweet_id\",\"content\"]},\"rows\":{\"Tweets\":[[1,\"Let us Code\"],[2,\"More than fifteen chars are here!\"]]}}",
"__typename": "QuestionNode"
}
}
}