Please select a subject first
Advertisements
Advertisements
Consider the following MOVIE table and write the SQL query based on it.
| MovieID | MovieName | Category | ReleaseDate | ProductionCost | BusinessCost |
| 001 | Hindi_Movie | Musical | 2018-04-23 | 124500 | 130000 |
| 002 | Tamil_Movie | Action | 2016-05-17 | 112000 | 118000 |
| 003 | English_Movie | Horror | 2017-08-06 | 245000 | 360000 |
| 004 | Bengali_Movie | Adventure | 2017-01-04 | 72000 | 100000 |
| 005 | Telugu_Movie | Action | - | 100000 | - |
| 006 | Punjabi_Movie | Comedy | - | 30500 | - |
List business is done by the movies showing only MovieID, MovieName, and Total_Earning. Total_ Earning to be calculated as the sum of ProductionCost and BusinessCost.
Concept: undefined >> undefined
Consider the following MOVIE table and write the SQL query based on it.
| MovieID | MovieName | Category | ReleaseDate | ProductionCost | BusinessCost |
| 001 | Hindi_Movie | Musical | 2018-04-23 | 124500 | 130000 |
| 002 | Tamil_Movie | Action | 2016-05-17 | 112000 | 118000 |
| 003 | English_Movie | Horror | 2017-08-06 | 245000 | 360000 |
| 004 | Bengali_Movie | Adventure | 2017-01-04 | 72000 | 100000 |
| 005 | Telugu_Movie | Action | - | 100000 | - |
| 006 | Punjabi_Movie | Comedy | - | 30500 | - |
List the different categories of movies.
Concept: undefined >> undefined
Advertisements
Consider the following MOVIE table and write the SQL query based on it.
| MovieID | MovieName | Category | ReleaseDate | ProductionCost | BusinessCost |
| 001 | Hindi_Movie | Musical | 2018-04-23 | 124500 | 130000 |
| 002 | Tamil_Movie | Action | 2016-05-17 | 112000 | 118000 |
| 003 | English_Movie | Horror | 2017-08-06 | 245000 | 360000 |
| 004 | Bengali_Movie | Adventure | 2017-01-04 | 72000 | 100000 |
| 005 | Telugu_Movie | Action | - | 100000 | - |
| 006 | Punjabi_Movie | Comedy | - | 30500 | - |
Find the net profit of each movie showing its MovieID, MovieName, and NetProfit. Net Profit is to be calculated as the difference between Business Cost and Production Cost.
Concept: undefined >> undefined
Consider the following MOVIE table and write the SQL query based on it.
| MovieID | MovieName | Category | ReleaseDate | ProductionCost | BusinessCost |
| 001 | Hindi_Movie | Musical | 2018-04-23 | 124500 | 130000 |
| 002 | Tamil_Movie | Action | 2016-05-17 | 112000 | 118000 |
| 003 | English_Movie | Horror | 2017-08-06 | 245000 | 360000 |
| 004 | Bengali_Movie | Adventure | 2017-01-04 | 72000 | 100000 |
| 005 | Telugu_Movie | Action | - | 100000 | - |
| 006 | Punjabi_Movie | Comedy | - | 30500 | - |
List MovieID, MovieName, and Cost for all movies with ProductionCost greater than 10,000 and less than 1,00,000.
Concept: undefined >> undefined
Consider the following MOVIE table and write the SQL query based on it.
| MovieID | MovieName | Category | ReleaseDate | ProductionCost | BusinessCost |
| 001 | Hindi_Movie | Musical | 2018-04-23 | 124500 | 130000 |
| 002 | Tamil_Movie | Action | 2016-05-17 | 112000 | 118000 |
| 003 | English_Movie | Horror | 2017-08-06 | 245000 | 360000 |
| 004 | Bengali_Movie | Adventure | 2017-01-04 | 72000 | 100000 |
| 005 | Telugu_Movie | Action | - | 100000 | - |
| 006 | Punjabi_Movie | Comedy | - | 30500 | - |
List details of all movies which fall in the category of comedy or action.
Concept: undefined >> undefined
Consider the following MOVIE table and write the SQL query based on it.
| MovieID | MovieName | Category | ReleaseDate | ProductionCost | BusinessCost |
| 001 | Hindi_Movie | Musical | 2018-04-23 | 124500 | 130000 |
| 002 | Tamil_Movie | Action | 2016-05-17 | 112000 | 118000 |
| 003 | English_Movie | Horror | 2017-08-06 | 245000 | 360000 |
| 004 | Bengali_Movie | Adventure | 2017-01-04 | 72000 | 100000 |
| 005 | Telugu_Movie | Action | - | 100000 | - |
| 006 | Punjabi_Movie | Comedy | - | 30500 | - |
List details of all movies which have not been released yet.
Concept: undefined >> undefined
Using the sports database containing two relations (TEAM, MATCH_DETAILS) and write the Query for the following:
- Display the MatchID of all those matches where both teams have scored more than 70.
- Display the MatchID of all those matches where FirstTeam has scored less than 70 but SecondTeam has scored more than 70.
- Display the MatchID and date of matches played by Team 1 and won by it.
- Display the MatchID of matches played by Team 2 and not won by it.
- Change the name of the relation TEAM to T_DATA. Also, change the attributes TeamID and TeamName to T_ID and T_NAME respectively.
Concept: undefined >> undefined
Using the sports database containing two relations (TEAM, MATCH_DETAILS) and write the Query for the following:
Display the MatchID of all those matches where FirstTeam has scored less than 70 but SecondTeam has scored more than 70.
Concept: undefined >> undefined
Using the sports database containing two relations (TEAM, MATCH_DETAILS) and write the Query for the following:
Display the MatchID and date of matches played by Team 1 and won by it.
Concept: undefined >> undefined
Using the sports database containing two relations (TEAM, MATCH_DETAILS) and write the Query for the following:
Display the MatchID of matches played by Team 2 and not won by it.
Concept: undefined >> undefined
What are the risks associated with HTTP? How can we resolve these risks by using HTTPS?
Concept: undefined >> undefined
Which of the following mode in the file opening statement results or generates an error if the file does not exist?
Concept: undefined >> undefined
The SELECT statement when combined with the ______ clause returns records without repetition.
Concept: undefined >> undefined
Write two points of difference between Circuit Switching and Packet Switching.
Concept: undefined >> undefined
Explain the use of ‘Foreign Key’ in a Relational Database Management System. Give example to support your answer.
Concept: undefined >> undefined
Consider the following tables – Bank_Account and Branch:
Table: Bank_Account
| ACode | Name | Type |
| A01 | Amrita | Savings |
| A02 | Parthodas | Current |
| A03 | Miraben | Current |
Table: Branch
| ACode | City |
| A01 | Delhi |
| A02 | Mumbai |
| A01 | Nagpur |
What will be the output of the following statement?
SELECT * FROM Bank_Account NATURAL JOIN Branch;
Concept: undefined >> undefined
Write a method COUNTLINES() in Python to read lines from the text file ‘TESTFILE.TXT’ and display the lines which do not start with any vowel.
Example:
If the file content is as follows:
An apple a day keeps the doctor away.
We all pray for everyone’s safety.
A marked difference will come in our country.
The COUNTLINES() function should display the output as:
The number of lines not starting with any vowel - 1
Concept: undefined >> undefined
Write a function ETCount() in Python, which should read each character of a text file “TESTFILE.TXT” and then count and display the count of occurrence of alphabets E and T individually (including small cases e and t too).
Example:
If the file content is as follows:
Today is a pleasant day.
It might rain today.
It is mentioned on weather sites
The ETCount() function should display the output as:
E or e : 6
T or t : 9
Concept: undefined >> undefined
______ clause is used with a SELECT statement to display data in a sorted form with respect to a specified column.
Concept: undefined >> undefined
Explain the concept of “Alternate Key” in a Relational Database Management System with an appropriate example.
Concept: undefined >> undefined
