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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T06:11:37+00:00 2026-06-16T06:11:37+00:00

This can’t be too hard, but I don’t know what the term is I’m

  • 0

This can’t be too hard, but I don’t know what the term is I’m looking for. I’m sure you guys can help me out. 🙂

I have a table tasks with rows that have a column project_id. Each project_id refers to (the id of) a row in the projects table. Each project belongs to a certain user which is why it has a column user_id.

I now want to select all tasks from this table where the project_id equals any project of a certain user.

Or put more simply:

Each TASK belongs to a PROJECT which belongs to a USER.

I want to create a SELECT-statement to receive all TASKS that belong to a specific USER. The only link between each TASK and a USER is through the PROJECT.

How do I accomplish this?

Thank you very much for your help! 🙂

  • 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-16T06:11:38+00:00Added an answer on June 16, 2026 at 6:11 am

    JOIN the tables:

    SELECT
      t.*
    FROM tasks t
    INNER JOIN projects p ON t.project_id = p.project_id
    INNER JOIN users    u ON p.user_id    = u.user_id
    WHERE u.user_id = @AcertianUserId
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

So this can't be too hard but I can't figure it out... I want
This can be the markup but I don't know whether it's semantically correct <figure
I know this can be done, but don't even know what its called to
I don't think this can be done cleanly, but I'll ask anyway. I have
I know this can seem a weird question but for me it would be
I know this can be done and i have seen it done using some
This can be a silly question but I have had some issues with it.
This can't be hard, but... I just need to get the most recent three
Maybe this can be done without StreamInsight, but I'm curious. I have an application
I know that this can be controlled at the system level, but I want

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.