Quiz Space

Database Management Systems · Quiz 1 · 27 Oct 2024 · September 2024 term

Question 10: Questions: Find the first names of players whose names s…

Question 10

+4 marksOne or more correct options

Consider the following relational schema and answer the given subquestions.

Questions:

  1. Find the first names of players whose names start with 'A' and have at least 4 characters.
  2. Find out the number of players in each team.
  3. List the team names that have players with the last name 'Smith'.

SQL queries:

sql
a. SELECT FirstName FROM Player WHERE FirstName LIKE 'A___%';
b. SELECT FirstName FROM Player WHERE FirstName LIKE 'A___';
c. SELECT TeamID, COUNT(PlayerID) FROM Player GROUP BY PlayerID;
d. SELECT TeamID, COUNT(PlayerID) FROM Player GROUP BY TeamID;
e. SELECT distinct t.TeamName FROM Team t INNER JOIN Player p
ON t.TeamID = p.TeamID WHERE p.LastName = 'Smith';
f. SELECT distinct t.TeamName FROM Team t, Player p WHERE t.TeamID = p.TeamID
AND p.LastName = 'Smith';

Match the correct SQL queries with the corresponding Questions.

Select all that apply.

  1. A

    1-a, 2-d, 3-f

  2. B

    1-b, 2-c, 3-e

  3. C

    1-a, 2-d, 3-e

  4. D

    1-a, 2-e, 3-f

Show answer

Correct answers

  • A

    1-a, 2-d, 3-f

  • C

    1-a, 2-d, 3-e

Question 10 of 14 in the IIT Madras BS Database Management Systems (DBMS) Quiz 1 paper sat on 27 Oct 2024, in the September 2024 term (IIT M DIPLOMA AN EXAM QDD2 27 Oct 2024). It carries 4 marks.

More questions from this paper

  1. Q1Which of the following is the correct sequence for query processing?
  2. Q2Figure question
  3. Q3A relational database contains two separate tables called Employee and Department.\ The Employee table has the attribut…
  4. Q4The relation Students(Name, Total_Marks) contains the names and marks of different students where no two students have …
  5. Q5Consider the table Faculty(ID, Name, Department, Salary) and the two queries Q1 and Q2 given below. Our goal is to find…
  6. Q6Consider the following Entity Relationship Diagram: Choose the correct statements.
  7. Q7We want to create the table nominee by using following SQL statements: Which of the following is/are the correct SQL st…
  8. Q8Consider relations Book and Author shown in Table 1 and Table 2 | BookID | Title | AuthorID | Genre | |---|---|---|---|…
  9. Q9Consider the following relations:\ Instructor(<u>InsID</u>, InsName, email)\ Course(<u>CID</u>, CName)\ Teaches(<u>InsI…
  10. Q11Consider the following relational schema and answer the given subquestions.
  11. Q12Consider the tables 3 and 4 and answer the given subquestions. Table 3: Relation team | team_id | name | ranking | coun…
  12. Q13Consider the tables 3 and 4 and answer the given subquestions. Table 3: Relation team | team_id | name | ranking | coun…
  13. Q14Using the SQL query shown below, a view named BestTeam is created. Which among the following SQL queries will display t…