0% found this document useful (0 votes)
6 views12 pages

Queries Set 1

The document outlines a series of queries related to database management, specifically focusing on creating and manipulating a 'Sports' database and its associated tables. It includes instructions for creating a 'team' table with constraints, adding data, and querying match details based on specific criteria. Additionally, it provides queries for displaying item stock information and dealer pricing in various formats.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views12 pages

Queries Set 1

The document outlines a series of queries related to database management, specifically focusing on creating and manipulating a 'Sports' database and its associated tables. It includes instructions for creating a 'team' table with constraints, adding data, and querying match details based on specific criteria. Additionally, it provides queries for displaying item stock information and dealer pricing in various formats.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 12

QUERIES SET 1

1.
2.

3.

4.
5.

6.
QUERIES SET 2

1.

2.
3.

4.

5.

6.
7.

8.

9.

10.
QUERIES SET 3

a) Create a database ‘Sports’.

b) Create a table ‘team’ with following considerations:


 It should have a column TeamID for storing an integer value from
1 to 9, which refers to unique identification of a team.
 Each team should have its associated name (TeamName), which
should be a string of length not less than 10 characters.
 Using table level constraint, make the TeamId a primary key.

c) Show the structure of the table.

d) As per the preferences, add the following information into the table:
 Row 1: (1, Tehlka)
 Row 2: (2, Toofan)
 Row3: (3, Aandhi)
 Row4: (4, Shailab)
e) Now create table Match_Details.
QUERIES SET 4

a)Display Match Id, Team ID, Team score who scored more than 70 in
first inning, along with the team name.

b) Display match ID, Team Name and second Team Score between 100
to 160.

c) Display Match ID, Team Names along with Match dates


d) Display unique team names

e) Display match Id and Match dates played by Aandhi and Shailab


QUERIES SET 5

a)Display all items in the ascending order of stock dates.

b) Display maximum price of items for each dealer individually as per


dcode from stock
c) Display all items in descending order by team names.

d) Display average price of items for each dealer individually as per


dcode from stock which average price is more than five.

e) Display the sum of quantity for each dcode.

You might also like