Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Write a query to list username of users who follow atleast 1 user but have never tweeted or retweeted any tweet. Sort the resulting list
Write a query to list username of users who follow atleast user but have never tweeted or retweeted any tweet. Sort the resulting list by username, in ascending order.
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
User Input is not applicable to this question.
Output
Run the code to print the output
Example
NA
Generated Expected Output
info icon
Insert Input
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started