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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T00:56:21+00:00 2026-06-16T00:56:21+00:00

So I have two Tables. The first are Names and their qualifications: Users: Name

  • 0

So I have two Tables. The first are Names and their qualifications:

Users:

Name    Qualification
---------------------
User1   QualA  
User1   QualB  
User1   QualC  
User2   QualA  
User2   QualD  

Then a Second table that links two qualifications from the first to another attribute:

Attributes:

Attribute   Qual1  Qual2
------------------------
Attr1       QualA  QualC    
Attr2       QualB  QualC    
Attr3       QualA  QualD    
Attr4       QualB  QualD    

Now I want to query the data so I get something like this in return:

User     Attribute
------------------
User1    Attr1   
User1    Attr2  
User2    Attr3  

So if the Name has the two qualifications required for the Attribute, they can be associated together.

  • 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-16T00:56:23+00:00Added an answer on June 16, 2026 at 12:56 am

    I would use this:

    select
      name, attribute
    from
      users inner join attributes
      on users.qualification in (attributes.qual1, attributes.qual2)
    group by attribute, name
    having count(*)=2
    

    I am trying to join each qualification for each user with attributes tables, based on any of the qualifications needed for the attribute. Then I’m grouping by attribute and name and counting the rows.

    If a combination of username and attribute has 2 rows, it means that the user has two qualifications for the attribute, and we have to show it.

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

Sidebar

Related Questions

I want to get data from two tables. I have patient first name and
I have two tables, first table structure (data) : -id -name -title -mail -source_id
I have two tables, one with monster names and their respective scores: CREATE TABLE
I have two tables: Client(id,name,...) Purchase(id,item,date,client_id,...) They have their respective Model, with their validations.
I have two tables: Users: ID, first_name, last_name Networks: user_id, friend_id, status I want
In my dbsql file, I have two CREATE TABLES the first works and the
I have two tables. The first table has a column with a lot of
I have two tables, the first has a primary key that is an identity,
I have two tables, the structure of the first partially recapitulates, iterates the structure
I have a database framework where I have two tables. The first table has

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.