sql based_practical -12 nd 13
sql based_practical -12 nd 13
Category VARCHAR(100),
ReleaseDate DATE,
ProductionCost INT,
BusinessCost INT
);
Record the output of this practical exercise and include it on a blank page in your
practical file.
--
like -
+---------+------------------+----------+-------------+----------------
+--------------+
| MovieID | MovieName | Category | ReleaseDate | ProductionCost |
BusinessCost |
+---------+------------------+----------+-------------+----------------
+--------------+
| 1 | Action Movie 1 | Action | 2023-10-26 | 10000000 |
20000000 |
| 2 | Comedy Movie 1 | Comedy | 2024-01-15 | 5000000 |
12000000 |
| 3 | Drama Movie 1 | Drama | 2023-07-01 | 8000000 |
15000000 |
| 4 | Sci-Fi Movie 1 | Sci-Fi | 2024-03-20 | 15000000 |
25000000 |
| 5 | Romantic Movie 1 | Romance | 2023-11-05 | 6000000 |
10000000 |
| 6 | pushpa-2 | action | NULL | 65550 |
180999 |
| 7 | pushpa-2 | action | NULL | 65550 |
NULL |
| 8 | ek the tiger-5 | drama | 2027-04-12 | 43434 |
NULL |
| 9 | ek the tiger-5 | drama | 2027-01-12 | 43434 |
NULL |
+---------+------------------+----------+-------------+----------------
+--------------+
------------------
practical - 13
1 - Retrieve movies informations without mentioning their columns name
2- list business done by Movies showing only movie ID movie name and business cost
3 - list different categories of movies
4 - find the net profit of each movie showing its ID name and net profit
5 - list all movies with production cost greater than 80000 less than 125000
showing ID name and production cost
6 - list all the movies which fall in the category of comedy or action
7 - list all the movies which have not been released yet
--------------
( Draw a diagram illustrating the execution of this command on a blank page in your
practical file.
1 - SELECT * FROM Movies;
2 - SELECT MovieID, MovieName, BusinessCost FROM Movies;
3 - SELECT DISTINCT Category FROM Movies;
4 - SELECT MovieID, MovieName, BusinessCost - ProductionCost AS NetProfit FROM
Movies;
5 - SELECT MovieID, MovieName, ProductionCost FROM Movies WHERE ProductionCost >
180000 AND ProductionCost < 1250008989898;
6 - SELECT MovieID, MovieName, Category FROM Movies WHERE Category = 'Comedy' OR
Category = 'Action';
7 - SELECT MovieID, MovieName, ReleaseDate FROM Movies WHERE ReleaseDate >
CURDATE();