Restricting rows in datasets based on SQL query

You can restrict which rows are included in a dataset by adding filtering conditions to the query. This limits the records available for analysis.

SQL-defined datasets make it easy to limit dataset content to specific rows by adding filtering conditions (for example, using a WHERE clause). This allows you to control the subset of data available for analysis based on your requirements.

  1. Switch to Dataset Detail interface and edit SQL query by applying the following statement:
    SELECT cereal_name, calories FROM cereals
    WHERE calories < 80;
  2. Click Save.
  3. Switch back to the Data Model interface.
  4. Click Show Data and verify that only records for the specified states appear.

    You can see that the dataset is limited to cereals that contain less than 80 calories, as specified in the SQL statement.