Link to home
Start Free TrialLog in
Avatar of Gustavo Baptista
Gustavo Baptista

asked on

Nested SELECT's

Hello Experts,

I wish to make a query like the attached image. I want to Sum the [Total] field for each record in the parent table "tblEOPs". I think this can be achieved with nested SELECT's. I just don't know how. Txs in advance.
Capture.PNG
Avatar of ste5an
ste5an
Flag of Germany image

What do table do you want to sum up?

Normally you would also add this table and create a GROUP BY query (the sigma symbol: Σ) and group by all columns except the column you want to sum.
Looks like you just need to drag and drop the field as shown by the red arrow, then select Soma in the Total row.
The image shows joins between tables.
In effect it generates a big table that contains all selected fields from individual tables.

To proceed in solving the issue:
Upload a sample database.
In that database, have the required query.
Check the output and comment if more help is needed.
Include few representative records.
ASKER CERTIFIED SOLUTION
Avatar of NerdsOfTech
NerdsOfTech
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Gustavo Baptista
Gustavo Baptista

ASKER

Hello Experts,

Sorry I couldn't make myself clear.

As you can see in Image_002, I have two lines, each with a diferent value. I get this result using the query in image_001.

If i SUM this column as in image_003, I get the result in image_004. This doesn't add up. What I want is the SUM of all Orders Totals that corespond to 40.341.004/16.
Image_001.PNG
Image_002.PNG
Image_003.PNG
Image_004.PNG
Help us by including a demo database.
If other experts are happy understanding then ignore my request.