Create sub-queries with SQL Query Designer

Pentaho Report Designer

Version
10.0.x
Audience
anonymous
Part Number
MK-95PDIA008-05
You can also design an SQL sub-query for your data source with SQL Query Designer by performing the following steps:
  1. Right-click on the query and select add where condition or add having condition.
    The condition.edit window appears.
  2. Click on the arrow next to the working query so that the whole path is expanded. Type in the condition and click OK.
  3. Click Preview to ensure the query is working. Click OK to exit the condition.edit window.
  4. Drag the queries you have created into the workspace, in the Details row. Preview the report to ensure that everything is working as expected.
You now have an SQL sub-query that returns a data set that you can use for reporting.