Structured Query Language (SQL)

Class 12 · Computer Science · 32 Questions

5(a)intermediate🔧 Apply1 markShort Answer

Using the sports database containing two relations (TEAM, MATCH_DETAILS) and write the queries for the following: Display the MatchID of all those matches where both the teams have scored more than 70.

1(d)beginner💡 Understand2 marksShort Answer

What do you understand by Cartesian Product?

2(a)beginner🔧 Apply1 markVery Short

Write the output produced by the following SQL statement: SELECT POW(2,3);

2(e)beginner🔧 Apply1 markVery Short

Write the output produced by the following SQL statement: SELECT LEFT("INDIA",3), RIGHT("Computer Science",4), MID("Informatics",3,4), SUBSTR("Practices",3);

4(a)beginner🔧 Apply1 markShort Answer

Suppose your school management has decided to conduct cricket matches between students of Class XI and Class XII. Students of each class are asked to join any one of the four teams – Team Titan, Team Rockers, Team Magnet and Team Hurricane. During summer vacations, various matches will be conducted between these teams. Help your sports teacher to do the following: Create a database “Sports”.

4(b)intermediate🔧 Apply2 marksShort Answer

Create a table “TEAM” with following considerations:

4(c)beginner🔧 Apply1 markShort Answer

Using table level constraint, make TeamID as the primary key.

4(e)beginner🔧 Apply1 markShort Answer

As per the preferences of the students four teams were formed as given below. Insert these four rows in TEAM table: Row 1: (1, Team Titan) Row 2: (2, Team Rockers) Row 3: (3, Team Magnet) Row 3: (4, Team Hurricane)

6(c)advanced🔧 Apply2 marksShort Answer

Further, they should be able to assign a new UCode to an item only if it has a valid UName. Write a query to add appropriate constraints to the SCHOOLUNIFORM database.

5(b)intermediate🔧 Apply1 markShort Answer

Using the sports database containing two relations (TEAM, MATCH_DETAILS) and write the queries for the following: Display the MatchID of all those matches where FirstTeam has scored less than 70 but SecondTeam has scored more than 70.

5(c)intermediate🔧 Apply1 markShort Answer

Using the sports database containing two relations (TEAM, MATCH_DETAILS) and write the queries for the following: Display the MatchID and date of matches played by Team 1 and won by it.

8(e)intermediate🔧 Apply1 markShort Answer

Using the CARSHOWROOM database given in the chapter, write the SQL queries for the following: List the total number of cars having no discount.

8(c)intermediate🔧 Apply1 markShort Answer

Using the CARSHOWROOM database given in the chapter, write the SQL queries for the following: Display the name of the costliest car with fuel type “Petrol”.

Think and Reflectintermediate💡 Understand2 marksShort Answer

What are the minimum and maximum income values that can be entered in the income attribute given the data type is INT?

1(a)beginner🧠 Remember2 marksShort Answer

Define RDBMS. Name any two RDBMS software.

1(c)beginner💡 Understand2 marksShort Answer

Site any two differences between Single Row Functions and Aggregate Functions.

1(e)intermediate🔍 Analyze2 marksShort Answer

Differentiate between the following statements:

1(f)intermediate🔧 Apply2 marksShort Answer

Write the name of the functions to perform the following operations:

2(b)beginner🔧 Apply1 markVery Short

Write the output produced by the following SQL statement: SELECT ROUND(342.9234,-1);

2(c)beginner🔧 Apply1 markVery Short

Write the output produced by the following SQL statement: SELECT LENGTH("Informatics Practices");

Page 1
Class 12 Computer Science Chapter 9: Structured Query Language (SQL) — NCERT Questions & Answers