Sei sulla pagina 1di 5

Question A.

Maximum Score of specific student You are provided with Six tables in University Schema in the following screen. T he table details are: 1.Student(StudentID, FName,LName, CourseID,PhoneNumber,EmailID) - contains infor mation about each Student 2.Course(CourseID,CourseName) - has details about the courses 3.StudentMarks(StudentID,SubjectID, Marks) - gives details about marks scored by students 4.Subject(SubjectID, CourseID, SubjectName) - contains information about every s ubject 5.Faculty( FacultyID, Name,EmailID,PhoneNumber,City )- has details about each Fa culty 6.FacultySubject (FacultyID, SubjectID) - contains information about each subjec t taught by its respective faculty -------------------------------------------------------------------------------Question B. Question statisfying certain conditions You are provided with Five tables in Assessments Schema in the following screen. The table details are: 1. Questions (QuestionID, QuestionDesc, Option1, Option2, Option3, Option4, Answ er, DifficultyLevel, Marks, SubjectId, TopicId) 2. Subjects (SubjectID, SubjectName) 3. Topics (TopicID, TopicName, SubjectID) 4. Tests (TestID, TestName, TestDuration) 5. TestQuestions(TestID, QuestionID) The database schema called Assessments is used as part of a portal that conducts various tests. a. Questions table contains the set of test questions. Questions are all multipl e-choice, single answer. This table contains several fields: QuestionID: Unique to a question (primary key) QuestionDesc: Question description Option1: Answer option-1 of the multiple choices Option2: Answer option-2 of the multiple choices Option3: Answer option-3 of the multiple choices Option4: Answer option-4 of the multiple choices Answer: Correct Answer (contains 1/2/3/4) Difficulty Level: Contains one of the value 1/2/3/4/5 (1- Easiest, 5 - Harde st) Marks: Marks for the question SubjectID: Subject Id TopicID: Topic Id. b. Subjects table contains the set of subjects. Each subject forms a unique row in the table. c. Topics table contains the set of topics. Each topic forms a unique row in the table and is mapped uniquely to one SubjectID. d. Tests table contains the set of tests in the portal. Each test forms a unique row in the Tests table. e. TestQuestions: A test contains 1-N questions. Each question of the test forms a unique row in the TestQuestions table. You are required to write an SQL Query based on the tables given.

-------------------------------------------------------------------------------Question C. Topics with limitred questions mapped You are provided with Five tables in Assessments Schema in the following screen. The table details are: 1. Questions (QuestionID, QuestionDesc, Option1, Option2, Option3, Option4, Answ er, DifficultyLevel, Marks, SubjectId, TopicId) 2. Subjects (SubjectID, SubjectName) 3. Topics (TopicID, TopicName, SubjectID) 4. Tests (TestID, TestName, TestDuration) 5. TestQuestions(TestID, QuestionID) The database schema called Assessments is used as part of a portal that conducts various tests. a. Questions table contains the set of test questions. Questions are all multipl e-choice, single answer. This table contains several fields: QuestionID: Unique to a question (primary key) QuestionDesc: Question description Option1: Answer option-1 of the multiple choices Option2: Answer option-2 of the multiple choices Option3: Answer option-3 of the multiple choices Option4: Answer option-4 of the multiple choices Answer: Correct Answer (contains 1/2/3/4) Difficulty Level: Contains one of the value 1/2/3/4/5 (1- Easiest, 5 - Harde st) Marks: Marks for the question SubjectID: Subject Id TopicID: Topic Id. b. Subjects table contains the set of subjects. Each subject forms a unique row in the table. c. Topics table contains the set of topics. Each topic forms a unique row in the table and is mapped uniquely to one SubjectID. d. Tests table contains the set of tests in the portal. Each test forms a unique row in the Tests table. e. TestQuestions: A test contains 1-N questions. Each question of the test forms a unique row in the TestQuestions table. You are required to write an SQL Query based on the tables given. -----------------------------------------------------------------------Question D. Lowest cost package A h d s TV network has several channels. Each channel is in a particular language. Eac channel has a number and a name. There are programs in the channel everyday an each program is for a certain duration in minutes. There are different package comprising of a set of channels. A channel can be in one or more package. Each package has a Cost.

Based on above description,you are provided with four tables in TV_Cable Schema in the following screen. The table details are: 1. Channels (ChannelNumber,ChannelName,Language)

2. Programs (ProgramID,ProgramName,Channelnumber,Duration,Category) 3. Packages (PackageID, PackageName, Cost) 4. Package_Channel(PackageID,ChannelNumber) You are required to write an SQL Query based on the tables given. -----------------------------------------------------------------------Question E. Packages which include Star Plus A h d s TV network has several channels. Each channel is in a particular language. Eac channel has a number and a name. There are programs in the channel everyday an each program is for a certain duration in minutes. There are different package comprising of a set of channels. A channel can be in one or more package. Each package has a Cost.

Based on above description,you are provided with four tables in TV_Cable Schema in the following screen. The table details are: 1. 2. 3. 4. Channels (ChannelNumber,ChannelName,Language) Programs (ProgramID,ProgramName,Channelnumber,Duration,Category) Packages (PackageID, PackageName, Cost) Package_Channel(PackageID,ChannelNumber)

You are required to write an SQL Query based on the tables given. -----------------------------------------------------------------------Question F. List of matches resulting in a draw Soccer is a popular sport played between two teams. A team consists of 11 player s. Each team has a goal keeper. The game is played on a rectangular field of gra ss. Based on the above description, you are provided with six tables in Soccer Schem a in the following screen. The table details are: 1. PlayerDetails Columns: (PlayerID, LastName, FirstName, Phone, StateCode) Description: This table gives personal details of each Player. Each player has a player ID and belongs to different states of a country. Each state has a state code associated to it. 2. StateDetails Columns: (StateCode, StateName) Description: Maps the state codes to its corresponding states of the country. 3. PlayerTeamDetails Columns: (PlayerID, TeamID, TenureStartingYear, TenureEndingYear) Description: This table gives information about each player and the team he is p laying for. Each player plays for a team for a certain period of time. 4. TeamDetails Columns: (TeamID, TeamName, Owner, Manager, Coach) Description: This table contains details of each team. Every team has a unique T eamID, an Owner, a Manager and a Coach associated with it. 5. PlayerMatchDetails Columns: (PlayerID, TeamID, MatchID, Goals) Description: Gives details about the matches played by a team and the goals scor

ed in the matches. Every match has a match id. Each team plays numerous matches. Number of goals scored by a player in a particular match is also displayed in the table. 6. MatchTeamDetails Columns: (MatchID, Team1, Team2, TG1, TG2, GroundName, MatchDate) Description: This table contains information about a match played between two te ams i.e., team IDs of both the teams, the field in which the match was played, t he date of the match played and goals scored by each team. Result of a match cou ld be victory of a team against the other or a draw between both the teams. Note : TG1 implies total goals scored by Team1 and TG2 implies total goals scored by Team2 in a particular match. You are required to write an SQL Query based on the tables given. -----------------------------------------------------------------Question G. Matches played in a certain month Soccer is a popular sport played between two teams. A team consists of 11 player s. Each team has a goal keeper. The game is played on a rectangular field of gra ss. Based on the above description, you are provided with six tables in Soccer Schem a in the following screen. The table details are: 1. PlayerDetails Columns: (PlayerID, LastName, FirstName, Phone, StateCode) Description: This table gives personal details of each Player. Each player has a player ID and belongs to different states of a country. Each state has a state code associated to it. 2. StateDetails Columns: (StateCode, StateName) Description: Maps the state codes to its corresponding states of the country. 3. PlayerTeamDetails Columns: (PlayerID, TeamID, TenureStartingYear, TenureEndingYear) Description: This table gives information about each player and the team he is p laying for. Each player plays for a team for a certain period of time. 4. TeamDetails Columns: (TeamID, TeamName, Owner, Manager, Coach) Description: This table contains details of each team. Every team has a unique T eamID, an Owner, a Manager and a Coach associated with it. 5. PlayerMatchDetails Columns: (PlayerID, TeamID, MatchID, Goals) Description: Gives details about the matches played by a team and the goals scor ed in the matches. Every match has a match id. Each team plays numerous matches. Number of goals scored by a player in a particular match is also displayed in the table. 6. MatchTeamDetails Columns: (MatchID, Team1, Team2, TG1, TG2, GroundName, MatchDate) Description: This table contains information about a match played between two te ams i.e., team IDs of both the teams, the field in which the match was played, t he date of the match played and goals scored by each team. Result of a match cou ld be victory of a team against the other or a draw between both the teams. Note

: TG1 implies total goals scored by Team1 and TG2 implies total goals scored by Team2 in a particular match. You are required to write an SQL Query based on the tables given. -----------------------------------------------------------------Question H. Teams playing on a cerian date Soccer is a popular sport played between two teams. A team consists of 11 player s. Each team has a goal keeper. The game is played on a rectangular field of gra ss. Based on the above description, you are provided with six tables in Soccer Schem a in the following screen. The table details are: 1. PlayerDetails Columns: (PlayerID, LastName, FirstName, Phone, StateCode) Description: This table gives personal details of each Player. Each player has a player ID and belongs to different states of a country. Each state has a state code associated to it. 2. StateDetails Columns: (StateCode, StateName) Description: Maps the state codes to its corresponding states of the country. 3. PlayerTeamDetails Columns: (PlayerID, TeamID, TenureStartingYear, TenureEndingYear) Description: This table gives information about each player and the team he is p laying for. Each player plays for a team for a certain period of time. 4. TeamDetails Columns: (TeamID, TeamName, Owner, Manager, Coach) Description: This table contains details of each team. Every team has a unique T eamID, an Owner, a Manager and a Coach associated with it. 5. PlayerMatchDetails Columns: (PlayerID, TeamID, MatchID, Goals) Description: Gives details about the matches played by a team and the goals scor ed in the matches. Every match has a match id. Each team plays numerous matches. Number of goals scored by a player in a particular match is also displayed in the table. 6. MatchTeamDetails Columns: (MatchID, Team1, Team2, TG1, TG2, GroundName, MatchDate) Description: This table contains information about a match played between two te ams i.e., team IDs of both the teams, the field in which the match was played, t he date of the match played and goals scored by each team. Result of a match cou ld be victory of a team against the other or a draw between both the teams. Note : TG1 implies total goals scored by Team1 and TG2 implies total goals scored by Team2 in a particular match. You are required to write an SQL Query based on the tables given. ----------------------------------------------------------------------

Potrebbero piacerti anche