> For clean Markdown content of this page, append .md to this URL. For the complete documentation index, see https://learning.postman.com/llms.txt. For full content including API reference and SDK examples, see https://learning.postman.com/llms-full.txt.

# Example dataset views in Postman

<Info class="plan">
  Datasets are available on Postman Solo, Team, and Enterprise plans. For more information, see the [pricing page](https://www.postman.com/pricing/).
</Info>

Views use SQL to define how data is retrieved from your dataset. By default, views use SQLite-compatible syntax and functions. If a dataset has only one external data source type, such as MySQL or PostgreSQL, you can also use syntax and functions specific to that data source.

The following examples show common ways to use views with different data sources.

## About the example dataset

In the following examples, assume you have a dataset with the following data sources:

* A local CSV file named `users` with the following data:

  ```csv
  userId,firstName,lastName,email
  1,John,Doe,john.doe@example.com
  2,Jane,Smith,jane.smith@example.com
  3,Bob,Johnson,bob.johnson@example.com
  ```
* A MySQL database named `orders` with the following data:

  ```text
  | orderId | userId | amount |
  |---------|--------|--------|
  | 101     | 1      | 50.00  |
  | 102     | 2      | 75.00  |
  | 103     | 3      | 25.00  |
  ```

## Select all data

You can create a view that selects all rows and columns.

```sql
SELECT * FROM source_users;
```

## Filter rows

You can filter rows to return only the data your workflow needs.

```sql
SELECT email, firstName, lastName
FROM source_users
WHERE userId = '2';
```

## Create new columns

You can create new columns using expressions and aliases in your query. This is useful when your tests or mock servers need values derived from existing data.

SQLite example:

```sql
SELECT firstName, lastName, firstName || ' ' || lastName AS fullName
FROM source_users;
```

MySQL example:

```sql
SELECT orderId, amount, CONCAT(orderId, ' ', amount) AS orderSummary
FROM source_orders;
```

## Join multiple data sources

You can combine data from multiple data sources, such as a local CSV file and a MySQL table. This is useful when you want a consolidated view of data that's stored in different places.

```sql wordWrap
SELECT source_users.userId, source_users.firstName, source_users.lastName, source_orders.orderId, source_orders.amount
FROM source_users
JOIN source_orders ON source_users.userId = source_orders.userId;
```