Question: Write an SQL query to find the first tweet's' user _ id including which atleast 3 tweets are retweeted consecutively in UserTweetRelation table. The resulting
Write an SQL query to find the first tweet's' userid including which atleast tweets are retweeted consecutively in UserTweetRelation table. The resulting table should be sorted in in ascending order by userid
Tables Schema as Below:
users
columnName dataType
id int
username varchar
email varchar
remembertoken varchar
createdat datetime
updatedat datetime
passworddigest varchar
tweets
columnName dataType
id int
content varchar
createdat datetime
updatedat datetime
UserTweetRelation
columnName dataType
id int
createdat datetime
retweet boolean
userid varchar
tweetid varchar
relationships
columnName dataType
id int
createdat datetime
updatedat datetime
followerid int
followedid int
Input
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
