I am making a query in Access from three tables. The first table is client and h
ID: 3873701 • Letter: I
Question
I am making a query in Access from three tables.
The first table is client and has the following attributes: client#, cname, gender, dob, state_of_residence, phone, address
The second table is product and it has the attributes: prod#, product_type, premium
The third table is payments and has the attributes: client#, product#, date_paid, amt_paid
I need to type a SQL query that lists client#, client name, product type, amount paid and date paid.
I have tried the following query:
SELECT Client.[client#], cname, product_type, amt_paid, date_paid
FROM Client, product, payments
WHERE Client.[client#] = payments.[client#]
The query is close but not quite what it is supposed to look like.
I need help explaining where I am messing up.
This has to be completed in Microsoft Access.
Explanation / Answer
SELECT Client.[client#], Client.cname, product.product_type, payments.amt_paid, payments.date_paid
FROM Client, product, payments
WHERE
Client.[client#] = payments.[client#]
and product.[prod#] = payments.[product#]
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.