Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6649555
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T00:47:17+00:00 2026-05-26T00:47:17+00:00

I am new to web programming and I’m trying to make a twitter-clone. At

  • 0

I am new to web programming and I’m trying to make a twitter-clone. At this point, I have 3 tables:

users (id, name)

  • id is the auto-generated id
  • name of the user

tweets (id, content, user_id)

  • id is the auto-generated id
  • content is the text of the tweet
  • user_id is the id of the user that made the post

followers (id, user_id, following_id)

  • id is the auto-generated id
  • user_id is the user who is doing the following
  • following_id is the user that is being followed

So, being new to sql as well, I am trying to build an SQL statement that would return the tweets that the currently-logged in user and of everyone he follows.

I tried to use this statement, which works sometimes, but other times, I get an error that says “Subquery returns more than 1 row”. Here is the statement:

SELECT * FROM tweets 
WHERE user_id IN
((SELECT following_id FROM followers
WHERE user_id = 1),1) ORDER BY date DESC
  • I put 1 as an example here, which would be the id of the currently logged-in user.

I haven’t had any luck with this statement; any help would be greatly appreciated! Thank you.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T00:47:18+00:00Added an answer on May 26, 2026 at 12:47 am
    SELECT * 
    FROM tweets 
    WHERE 
      user_id IN (SELECT following_id FROM followers WHERE user_id = 1)
      OR user_id = 1
    ORDER BY date DESC
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm new to web programming in general so this is probably a really simple
I am new to web programming...I have been asked to create a simple Internet
I'm relatively new to web application programming so I hope this question isn't too
I've came across this new acronym, SOFEA, apparently a new programming paradigm for web
I'm new to web programming and I have the following form that I wish
I am fairly new to web programming, I have mainly used java to create
i'm kinda new in web programming, i'm trying to design a search page. i
I am a college student slightly new to web programming and lately I have
I know this is a very basic question. I am new to web programming.Im
I'm currently trying to install the new Microsoft WebMatrix Beta 2 (a web programming

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.