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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T12:49:02+00:00 2026-06-10T12:49:02+00:00

I’m using 2 tables Let’s say (There’s more to these tables but that’s just

  • 0

I’m using 2 tables

Let’s say (There’s more to these tables but that’s just a very simple view of it)

Table1 is
sID   ResearchPaperID 
1     A1
2     A1
3     A1
4     A1


Table2 is
sID    Name
1     Person1
2     Person2
3     Person3
4     Person4

What I need to do is find people who are associated with(co-wrote) Person1’s papers but not show Person1 in the output.

Currently I have something like

SELECT Table2.sID, Table1.sID
FROM Table2, Table1
WHERE Table2.sID = Table1.sID
AND Table2.Name = 'Person1'

which would give me everything that Person1 has done.

This is a homework question been stuck on it for a while now.

Can’t use sub-queries as well.
Sorry I should mention no use of inner joins, outer joins, left/right joins, natural joins.

It’s not supposed to be much harder than what I have above just using basic commands..

[EDIT]
Output would be something like this

ResearchPaperID    Name
A1                 Person2
A1                 Person3
A1                 Person4

I want to find people that are co-writers of papers of person1 but not show person1 in the output

  • 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-10T12:49:04+00:00Added an answer on June 10, 2026 at 12:49 pm

    Solution, without subqueries and JOIN’s:

    select distinct t3.sID, t3.ResearchPaperID
    from Table1 t1, Table2 t2, Table1 t3
    where t1.sID = t2.sID and t2.Name = 'Person1'
      and t1.ResearchPaperID = t3.ResearchPaperID
      and t3.sID <> t2.sID       -- this restriction is the one that removes the 'Person1'
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

That's pretty much it. I'm using Nokogiri to scrape a web page what has
I have just tried to save a simple *.rtf file with some websites and
I am doing a simple coin flipping experiment for class that involves flipping a
I have a French site that I want to parse, but am running into
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
I know there's a lot of other questions out there that deal with this
Seemingly simple, but I cannot find anything relevant on the web. What is the
I'm making a simple page using Google Maps API 3. My first. One marker
I'm new to using the Perl treebuilder module for HTML parsing and can't figure
link Im having trouble converting the html entites into html characters, (&# 8217;) i

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.