By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,972 Members | 1,126 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,972 IT Pros & Developers. It's quick & easy.

ACCESS 07 SQL or QUERY.

P: 32
3 tables

Transaction (Transaction_id, Customer_id, date)

Product (Product_id, Description, Value)

Transaction_Product (Transaction_id, Product_id) <<<<This being the resolve of the above two tables.


I want only 1 final output to show the TOTAL value of all the products sold in that transaction MULTIPLIED by its value. Basically, a SUBTOTAL.
May 10 '07 #1
Share this Question
Share on Google+
1 Reply


Rabbit
Expert Mod 10K+
P: 12,349
3 tables

Transaction (Transaction_id, Customer_id, date)

Product (Product_id, Description, Value)

Transaction_Product (Transaction_id, Product_id) <<<<This being the resolve of the above two tables.


I want only 1 final output to show the TOTAL value of all the products sold in that transaction MULTIPLIED by its value. Basically, a SUBTOTAL.
That's not the subtotal. The total value of the products in a transaction multiplied by its value (which is the same thing as the total value of the products in a transaction). Meaning what you just described is subtotal squared. I'll assume that's not what you meant.

What you'll want to is is group by transaction_id and do a sum on the value. After joining the tables of course.
May 10 '07 #2

Post your reply

Sign in to post your reply or Sign up for a free account.