Add a new aggregate, and clean up the diagram by removing unused
elements.
- Create an additional Aggregate Simple Query
and name it ValueByBook. - Connect it to the IndividualPositions join object.
- Click Copy Columns (
) in the shape toolbar and
copy columns BookId, CurrentPosition, and AveragePosition.
- Set column expressions:
- BookId
IndividualPositions.BookId
- CurrentPosition sum (
IndividualPositions.CurrentPosition )
- AveragePosition sum (
IndividualPositions.AveragePosition )
Tip: Use the inline editor. Double-click on the column expression,
and use the Home and End keys
to quickly edit the expression.
- Add the GROUP BY clause ({
}) IndividualPositions.BookId.
- Toggle to OUTPUT.
- Delete any unused elements from the project so that you can run
it.
For example, if you have not done so, remove the unused input stream element
NEWSTREAM that was added automatically when you created the project.
- (Optional) Toggle to Iconic mode or Verbose mode.
- Click the Toggle Image button in the upper left corner of a
shape, or,
- Click the All Iconic
or All Verbose
button
in the toolbar.
- (Optional) Click
Layout Left to Right to line up
shapes.
- (Optional) To close the diagram, press Ctrl+W or
Ctrl+F4, or click the X on the tab
at the top of the editor .
The completed diagram should look like this in Verbose mode. You might need to open
some compartments and click

again to see details for all elements.
Completed Sample Portfolio Valuation Diagram
Next
Follow the procedures in the next chapter,
Testing Your Project, to compile and test the sample project in
ESP Studio, using test data provided in your
installation.