- Introduction
- MOVIES Table
- Queries
- 1st Query
- 2nd Query
- 3rd Query
- 4th Query
- 5h Query
- 6th Query
- 7th Query
- 8th Query
- 9th Query
- 10th Query
This repository is created as a part of NJC's MuleSoft flagship Internship program. It contains a movie table with name, actor, actress, director, year of release as its attributes. Data is retrieved from the table by using queries, with the help of SQL.
- Created "movie_db" database with table name "MOVIES" and stored details of movies.
- File '_dbconnect.php' is used to connect to XAMPP server.
- File 'queries.php' is used to execute queries and display the output table in website.
- File 'movies.sql' contains all the SQL queries used in this test.
SELECT DISTINCT actor FROM movies
ORDER BY actor;
SELECT DISTINCT actress FROM movies
ORDER BY actress;
SELECT name, director FROM movies
WHERE actor = 'darshan thoogudeepa';
SELECT name, actor, actress, director FROM movies
WHERE year_of_release > 2020;
SELECT * FROM movies
WHERE name = 'FREE GUY';
SELECT count(*) AS Movies_2019 FROM movies
WHERE year_of_release = 2019;
8. Retrieve movie name, director name and year of release which is arranged with respect to director's name in ascending order.
SELECT name, director, year_of_release FROM movies
ORDER BY director;
SELECT name, actor, actress, year_of_release FROM movies
WHERE year_of_release BETWEEN 2015 AND 2020 ORDER BY year_of_release DESC;
10. Retrieve movie name and year of release of movies which are not released in the year 2021, arranged with respect to year of release in ascending order.
SELECT name, year_of_release FROM movies
WHERE year_of_release <> 2021 ORDER BY year_of_release;