Check out example codes for "create view mysql". It will help you in understanding the concepts better.

Code Example 1

CREATE VIEW view_name AS

SELECT column1, column2, ...

FROM table_name

WHERE condition;

Code Example 2

CREATE VIEW view_name AS SELECT id,category,MAX(created_at),content,title FROM table WHERE condition GROUP BY category

Code Example 3

CREATE VIEW `general_v_movie_rentals` AS SELECT mb.`membership_number`,mb.`full_names`,mo.`title`,mr.`transaction_date`,mr.`return_date` FROM `movierentals` AS mr INNER JOIN `members` AS mb ON mr.`membership_number` = mb.`membership_number` INNER JOIN `movies` AS mo ON mr.`movie_id` = mo.`movie_id`;

Learn ReactJs, React Native from akashmittal.com