gmmastros, you are indeed correct with my not needing subqueries to resolve this SQL but as a matter of personal interest I was trying ot figure it out. Someone at work was telling me that it wasn't possible but I think it is.
Thanks NoCoolHandle, I was just wondering if it was possible to do it without joins. I've got an upcoming program that I will probably have to use more subqueries than joins and argh, my subquery skills need some severe honing.
Here's the Innerjoin solution I have, which works like a charm, I'm just curious as to how to get the same thing using no innerjoins.
SELECT Customers.cust_state, SUM([quantity] * [item_price]) AS volume
FROM (Customers INNER JOIN
Orders ON Customers.cust_id =...
Okay, I am trying to get this to work in subquery form because I seriously need to brush up on my subquery knowledge and for the life of me I cannot get it to work right. I can do innerjoins and get it to work but I know there is a way to do it other than innerjoins. I'm close but not close...
I need to list sales volume which is the total of all orders by state, my problem is that I can't get the state's orders to total correctly. Here's what I have so far, and it's working with an Access database using VB.NET's built in query builder to do the statement.
The tables look like this...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.