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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T19:13:01+00:00 2026-06-13T19:13:01+00:00

I know this question has already asked here, but I can’t figure this one

  • 0

I know this question has already asked here, but I can’t figure this one out from the previous answers.

We’ve got 2 tables:

members
-----------------------
| id | country_iso_3 |
-----------------------
  1    USA
  2    DZA
  3    FRA
  4    ILI
  5    USA
  6    USA


members_details
-----------------------
| member_id | city    |
-----------------------
  1          AA
  2          BB
  3          CC
  4          DD
  5          EE
  6          FF

Now I want to query members_details and select the cities which are from the same countries, here “AA”, “EE” and “FF” should be the results (because the members are from USA)

I know how to compare different cols from different tables, but here we need to check the second table ‘member_id’ and the first table ‘id (country_iso_3)’ somehow!

  • 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-13T19:13:02+00:00Added an answer on June 13, 2026 at 7:13 pm
    Select city from members LEFT JOIN members_details 
    ON members.id = members_details.memberid Where country_iso_3 = 'USA' 
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I know this question has been asked, but I can't find more than one
I know this question has asked many times in SO,but i couldn't figure out
I know that this question has already been asked HERE but sadly none of
I know this question has been asked already but I would like to solve
i know this question has been asked here but i am stuck with this
I know this question has been asked elsewhere but reading the already given answers
I know this question has already been asked, but my question is more general
I know that this question has been already asked, but the existing answers do
First of all, I know this question has already been asked but the answer
I know this question has probably been asked already but I would really like

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.