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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T00:20:31+00:00 2026-05-18T00:20:31+00:00

I always struggle with joins within Access. Can someone guide me? 4 tables. Contest

  • 0

I always struggle with joins within Access. Can someone guide me?

4 tables.

Contest (id, user_id, pageviews)
Users (id, role_name, location)
Roles (id, role_name, type1, type2, type3)
Locations (id, location_name, city, state)

Regarding the Roles table — type1, type2, type3 will have a Y if role_name is this type. So if “Regular” for role_name would have a Y within type1, “Moderator” for role-name would have a Y within type2, “Admin” for role_name would have a Y within type3. I didn’t design this database.

So what I’m trying to do. I want to output the following: user_id, pageviews, role_name, city, state.

I’m selecting the user_id and pageviews from Contest. I then need to get the role_name of this user, so I need to join the Users table to the Contest table, right?

From there, I need to also select the location information from the Locations table — I assume I just join on Locations.location_name = Users.location?

Here is the tricky part. I only want to output if type1, within the Roles table, is Y.

I’m lost!

  • 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-05-18T00:20:32+00:00Added an answer on May 18, 2026 at 12:20 am

    As far as I can see, this is a query that can be built in the query design window, because you do not seem to need left joins or any other modifications, so:

    SELECT Contest.user_id, 
           Contest.pageviews, 
           Roles.role_name, 
           Locations.city, 
           Locations.state
    FROM ((Contest 
    INNER JOIN Users 
    ON Contest.user_id = Users.id) 
    INNER JOIN Roles 
    ON Users.role_name = Roles.role_name) 
    INNER JOIN Locations 
    ON Users.location = Locations.location_name
    WHERE Roles.type1="Y"
    

    Lots of parentheses 🙂

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

Sidebar

Related Questions

In my Quest to understanding Mnesia, I still struggle with thinking in relational terms.
First I need to apologize for the long post, I struggle with being overly
My two questions are: Can I use clustered indexes to speed up bulk inserts
always when I open some project(which already exists) in eclipse I get this question
Always, I have got the following message: name 'byteProivder_LengthChanged' does not match 'Methods, properities
always the same structure. image (with float:left) text image (with float:left) text image (with
always in a ComboBox a arrow button is show where user click and then
Always or absolutely most often very educated and professional partners I speak with talk
I always thought that enough requirement that class should satisfy to be able to

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.