filterDefn = new FilterDefinition(new ScriptExpression( "Total.sum(row.ROW_AMOUNT,Total.NO_FILTER,2)<=400")); groupDefn[1].setKeyExpression("row.GROUP_GROUP1"); groupDefn[1].addFilter(filterDefn); ConditionalExpression ce = new ConditionalExpression( "Total.sum(row.ROW_AMOUNT)", IConditionalExpression.OP_BOTTOM_N, "1"); ce.setGroupName( "group1" ); filterDefn = new FilterDefinition(ce); groupDefn[1].addFilter(filterDefn);  String[] bindingNameRow = new String[4]; bindingNameRow[0] = "ROW_COUNTRY"; bindingNameRow[1] = "ROW_CITY"; bindingNameRow[2] = "ROW_SALE_DATE"; bindingNameRow[3] = "ROW_AMOUNT"; IBaseExpression[] bindingExprRow = new IBaseExpression[4]; bindingExprRow[0] = new ScriptExpression( "dataSetRow.COUNTRY" ); bindingExprRow[1] = new ScriptExpression( "dataSetRow.CITY" ); bindingExprRow[2] = new ScriptExpression( "dataSetRow.SALE_DATE" ); bindingExprRow[3] = new ScriptExpression( "dataSetRow.AMOUNT" );  createAndRunQuery(bindingNameGroup, bindingExprGroup, groupDefn, null, null, null, bindingNameFilter, bindingExprFilter,filters,bindingNameRow, bindingExprRow);
	public void test_MultiPassFilterGroup( ) throws Exception	{		String sqlStatement = "select COUNTRY,AMOUNT, SALE_DATE from " + getTestTableName( );		( ( OdaDataSetDesign )this.dataSet ).setQueryText( sqlStatement );						IBaseExpression[] expressions = new IBaseExpression[]{				new ScriptExpression( "row.COUNTRY" ),				new ScriptExpression( "row.AMOUNT" ),				new ScriptExpression( "row.SALE_DATE" )						};				String names[] = { "COL_COUNTRY", "COL_AMOUNT", "COL_SALE_DATE"};				QueryDefinition queryDefn = new QueryDefinition( );		queryDefn.setDataSetName( this.dataSet.getName( ) );		for( int i = 0; i < expressions.length; i ++ )		{			queryDefn.addResultSetExpression( names[i], expressions[ i ] );		}						FilterDefinition filterDefn = new FilterDefinition( 				new ConditionalExpression( "Total.sum(row.AMOUNT,null,1)", IConditionalExpression.OP_BOTTOM_PERCENT, "25" ) 					);		GroupDefinition groupDefn = new GroupDefinition();		groupDefn.setKeyExpression( "row.SALE_DATE" );				groupDefn.setInterval( 2 );		groupDefn.setIntervalRange( IGroupDefinition.MONTH_INTERVAL);						groupDefn.addFilter( filterDefn );				queryDefn.addGroup( groupDefn );		IPreparedQuery preparedQuery = dataEngine.prepare( queryDefn );		IQueryResults queryResults = preparedQuery.execute( null );		IResultIterator resultIt = queryResults.getResultIterator( );				outputQueryResult( resultIt, names );		checkOutputFile( );			}