Views allow the user to create a simpler version of a given SQL statement.
It is a logical table based on one table. A view contains no data by itself.
For example, you can change the names of the selected columns or the order of the columns.
You can also filter the result of a select SQL statement on a table.
CREATE VIEW my_view (new_name1, new_name2)
as SELECT column1, column3 FROM my_table
This will create a View named "my_view" with 2 columns: new_name_1 and new_name_2. These columns are based on the columns column1 and column3 of the table default.my_table.
From our example above, let's say that the table default.my_table is a 5 columns Fact table as follows:
The View named "my_view" that we created will be a logical table (there is no real data in that table) that looks like:
You can then make queries such as
SELECT FROM VIEW
SELECT * FROM my_view
This will returns all the data from the columns column1 and column3 of my_table.
You can learn more about the CREATE VIEW commands here