Skip to content

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.

prajwalmali/NJC-s-flagship-internship-program-coding-round

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NJC’s flagship internship program coding round

Table of contents

Introduction

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.

  1. Created "movie_db" database with table name "MOVIES" and stored details of movies.
  2. File '_dbconnect.php' is used to connect to XAMPP server.
  3. File 'queries.php' is used to execute queries and display the output table in website.
  4. File 'movies.sql' contains all the SQL queries used in this test.

Table stored in the database

Movies_Table

Queries

1. Retrieve all the attributes in table.

SELECT * FROM MOVIES; All_Movie_Details

2. Retrieve actor names.

SELECT DISTINCT actor FROM movies ORDER BY actor; Actor_Names

3. Retrieve actress names.

SELECT DISTINCT actress FROM movies ORDER BY actress; Actress_Names

4. Retrieve Movie name and director name of movies with actor name as Darshan thoogudeepa.

SELECT name, director FROM movies WHERE actor = 'darshan thoogudeepa'; Movies_By_Darshan

5. Retrieve details of movies released after year 2020.

SELECT name, actor, actress, director FROM movies WHERE year_of_release > 2020; Movies_Released_After_2020

6. Retrieve details of movie named as Free Guy.

SELECT * FROM movies WHERE name = 'FREE GUY'; Details_Of_Movie_FreeGuy

7. Retrieve the number of movies released in the year 2019.

SELECT count(*) AS Movies_2019 FROM movies WHERE year_of_release = 2019; Number_Of_Movies_Released_In_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; Movies_Arranged_With_Respect_To_Directors_Name

9. Retrieve details of movies released in between the year 2015 and 2020 in descending order.

SELECT name, actor, actress, year_of_release FROM movies WHERE year_of_release BETWEEN 2015 AND 2020 ORDER BY year_of_release DESC; Movies_Released_Between_2015_and_2020_In_Descending_Order

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; Movies_Whose_Release_Year_Is_Not_2021

About

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.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages