Completing the Sample Project

Add a new aggregate, and clean up the diagram by removing unused elements.

  1. Create an additional Aggregate Simple Query aggregate_template.gif and name it ValueByBook.
    1. Connect it to the IndividualPositions join object.
    2. Click Copy Columns (copycolumn.gif) in the shape toolbar and copy columns BookId, CurrentPosition, and AveragePosition.
    3. 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.
    4. Add the Group By clause ({ }) IndividualPositions.BookId.
    5. Toggle to OUTPUT.
  2. Delete any used 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.
  3. (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 all_iconic.gif or All Verbose all_verbose.gif button in the toolbar.
  4. (Optional) Click layout left right Layout left to right to line up shapes.
  5. (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 layout left right again to see details for all elements.
Completed Sample Portfolio Valuation Diagram
Completed Portfolio Sample Diagram Verbose
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.
Related concepts
Simple Queries