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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T22:27:16+00:00 2026-06-06T22:27:16+00:00

That title is presumably awfully worded. I have some PostgreSQL tables. There is a

  • 0

That title is presumably awfully worded. I have some PostgreSQL tables. There is a bridge table, that also holds extra data, so not strictly a bridge, but acts that way also. It goes something like so:

player_game
===========
player_game_id PK
player_id FK -> player
game_id FK -> game
other stuff.

I want to compile a list of all such game_ids that contain two players of my choice.

So I could find for example, games in which player 1234 played with player 9876.

There can be between 2 and 10 players in a game.

  • 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-06T22:27:17+00:00Added an answer on June 6, 2026 at 10:27 pm
    select pg1.game_id from player_game pg1
    inner join player_game pg2 on pg1.game_id = pg2.game_id
    where pg1.player_id = 1234
    and pg2.player_id = 9876
    group by pg1.game_id -- or : AND  pg1.player_game_id < pg2.player_game_id
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I guess that title is self-explanatory. Is there any such effort been made? Some
That title may need some work. Perhaps after reading this, you may be able
I'm not sure that title is worded very well, but not sure how else
(I realize that my title is poor. If after reading the question you have
I have a page title on a page. When I hover that title, I
I have a class with a title in it. I have a property that
Say i have a string like that title: \u041e\u0434\u0440\u0438\u043d\u044f-\u0423\u0440\u0431\u043e\u0432\u0430 ... What would be the
I have a table that I want : when the table has been updated,
The title sums it up. Presumably anything that can be done with source-code-generating parser-generators
I hope that title is clear enough. I have 2 projects, MyProject.Website (ASP.NET MVC3

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.