davidkohne
asked on
Multi Table MS Access Query
I have a MS Access database with three (3) tables:
- tbl_Master (primary key on "customer_id).
1:Many relationship on "account_number" in the "tbl_Relationship table.
- tbl_Accounts (primary key on "account_number")
1:Many relationship on "customer_id" in the "tbl_Relationship table.
- tbl_Relationship (primary key on "customer_id" and "account_number")
I am trying to design a query (or two (2) queries that will show me the following:
QUERY 1
CUSTOMER_ID | TOTAL # of Accounts
I would like this query to show me the total number of accounts associated with each unique customer ID and just show the total.
QUERY 2
CUSTOMER_ID | ACCOUNT_NUMBER | UPDATE_BY | DATE
I would like the query to show me me the account numbers that are associated with each unique customer ID, along with who updated the account and when.
Can anyone help?
- tbl_Master (primary key on "customer_id).
1:Many relationship on "account_number" in the "tbl_Relationship table.
- tbl_Accounts (primary key on "account_number")
1:Many relationship on "customer_id" in the "tbl_Relationship table.
- tbl_Relationship (primary key on "customer_id" and "account_number")
I am trying to design a query (or two (2) queries that will show me the following:
QUERY 1
CUSTOMER_ID | TOTAL # of Accounts
I would like this query to show me the total number of accounts associated with each unique customer ID and just show the total.
QUERY 2
CUSTOMER_ID | ACCOUNT_NUMBER | UPDATE_BY | DATE
I would like the query to show me me the account numbers that are associated with each unique customer ID, along with who updated the account and when.
Can anyone help?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Select Distinct Customer_ID, Account_Number,Update_By,D
From tbl_Master
Inner Join tbl_Accounts on tblMaster.Customer_ID=tbl_