Click Save. Click on the pull-down menu next to the AS field and select movingAvgPrice. Click the plus Sign button. Click Validate. Select the Group tab. Configure the Group tab as follows: Click Save. Click Save Query. Click and drag an Output icon from

3-78 Oracle Complex Event Processing Getting Started Figure 3–65 Expression Builder: Applying the AVG Function

34. Click Save.

The expression is added to the Project Expression field as Figure 3–66 shows. Oracle CEP Samples 3-79 Figure 3–66 Select Configuration Dialog: With Expression

35. Click on the pull-down menu next to the AS field and select movingAvgPrice.

36. Click the plus Sign button.

The source property is added to the project expression of the Generated CQL Statement as Figure 3–67 shows. 3-80 Oracle Complex Event Processing Getting Started Figure 3–67 Select Configuration Dialog: Source Property price Mapped to Output Event Property

37. Click Validate.

A validation error dialog is shown as Figure 3–68 shows. Figure 3–68 Validation Error: GROUP BY Because we are partitioning, we must specify a GROUP BY clause.

38. Select the Group tab.

The Group tab appears as Figure 3–69 shows. Oracle CEP Samples 3-81 Figure 3–69 Group Tab

39. Configure the Group tab as follows:

■ Select StockVolGt1000 from the Select a source pull-down menu. ■ Select symbol from the Properties list. ■ Click the Plus Sign button. The symbol property is added to GROUP BY clause as Figure 3–70 shows. 3-82 Oracle Complex Event Processing Getting Started Figure 3–70 Group Tab: With symbol Grouping Property

40. Click Save.

41. Click Save Query.

Next, we want to connect the query to an output.

42. Click and drag an Output icon from the CQL Constructs palette and drop it

anywhere in the Query Wizard canvas as Figure 3–71 shows. Oracle CEP Samples 3-83 Figure 3–71 Query Wizard: Output

43. Click on the Select icon and drag to the Output icon to connect the Oracle CQL

constructs.

44. Double-click the Output icon.

The Output configuration screen appears as Figure 3–72 shows. 3-84 Oracle Complex Event Processing Getting Started Figure 3–72 Output Configuration Dialog

45. Configure the Output as follows: