-
Click ELTSubqueryMap to open its Basic settings view.
Note that you do not need to specify the Teradata database connection
information in the ELTSubqueryMap component.
The connection information will be specified in the ELTMap component.
-
Click the [...] button next to ELT Teradata Map Editor to open its map
editor.
-
Add the input table CourseScore by clicking
the [+] button in the upper left corner of the
map editor and then selecting the relevant table name from the drop-down list in
the pop-up dialog box.
-
Add an output table by clicking the [+]
button in the upper right corner of the map editor and then entering the table
name TotalScore in the corresponding field in
the pop-up dialog box.
-
Drag StuName, Subject, and Score columns in
the input table and then drop them to the output table.
-
Click the Add filter row button in the upper
right corner of the output table and select Add an
other(GROUP...) clause from the pop-up menu. Then in the
Additional other clauses (GROUP/ORDER
BY...) field displayed, enter the clause GROUP BY CourseScore.StuName, CourseScore.Subject.
Add the aggregate function SUM for the column Score of the output table by changing the expression of this
column to SUM(CourseScore.Score).
-
Click the Generated SQL Select query for "table1"
output tab at the bottom of the map editor to display the
corresponding generated SQL statement.
This SQL query will appear as a subquery in the SQL query generated by the
ELTMap component.
-
Click OK to validate these changes and close
the map editor.
-
Connect ELTSubqueryMap to ELTMap using the Link > TotalScore (table1)
link. Note that the link is renamed automatically to TotalScore (Table_ref) since the output table TotalScore here is a reference table.