Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

Temporary Datasets

Temporary Datasets

Reference: 📖Explanation

Sometimes in order to ease things out you need to create a temporary version of the data for either viewing it or for running some further calculations to it. Now if it is just that you want to run the same query daily and get the results you might as well save it as a VIEW . You can consider view as a SQL statement saved with a name.

While it is very important to know what a VIEW is, however in most cases the ask will be to solve some question which for which you need to create a temporary dataset and run queries on that. You can use Common Table Expression or CTE for that. It uses the WITH keyword.

CTE can be of 2 types:

The above image shows a case where we need to use CTE to answer a question

Figure 1:The above image shows a case where we need to use CTE to answer a question