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 8876733
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T19:16:57+00:00 2026-06-14T19:16:57+00:00

i have 3 tables login – user_id, username project – project_id, project_name task –

  • 0

i have 3 tables

login – user_id, username

project – project_id, project_name

task – task_id, project_id, task_giver, task_receiver, task_content

*where task_giver and task_receiver has the user_id from login table*

MY QUERY :

SELECT login.username, project.project_name, tasks.task_content, tasks.task_giver
  FROM tasks
  JOIN login ON login.user_id = tasks.task_receiver 
  JOIN project ON tasks.project_id = project.project_id
 ;

But I am not getting the task_givers name getting only id.
How can I get his name?

  • 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-06-14T19:16:58+00:00Added an answer on June 14, 2026 at 7:16 pm

    JOIN the login table one more time like so:

    SELECT 
      receivers.username 'Task receiver',
      givers.username 'Task giver', 
      p.project_name, 
      t.task_content
    FROM tasks t
    INNER JOIN login   receivers ON receivers.user_id = t.task_receiver 
    INNER JOIN login   givers    ON givers.user_id    = t.task_giver
    INNER JOIN project p         ON t.project_id      = p.project_id
    

    SQL Fiddle Demo with some sample data

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have 3 tables: users: Id Login 1 John 2 Bill 3 Jim computers:
I have two sql tables for user login, store and retrieve data according to
i have two tables i am trying to get information from. login table -
I have 2 tables called login and Roles . In the login table, I
i have two tables which form part of my login/register system: these are userlogin
I have three tables: Login, LoginRoles and Roles. Login joins to LoginRoles and LoginRoles
OK have 2 tables user_id login_history 1 2011-01-01 1 2011-01-02 1 2011-03-05 1 2011-04-05
I have created 3 tables: Login(firstname,lastname,age,gender,email) Scraps(email,scrap,posttime) requests(email,frnemail,frnshpstatus,frnpic) I want a query that connects
I have 2 tables. One is main table and other one is login table.
I have a 2 tables.UniversityReg & Login.When university registered to the system then General

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.