0% found this document useful (0 votes)
9 views4 pages

(Eng) Prac - 4 DBMS

The document outlines a practice work assignment focused on SQL queries involving a student examination database. It includes tasks such as deleting records, updating student information, selecting specific data, and using aggregate functions to analyze scores. The assignment aims to enhance skills in creating and executing DML queries in SQL.

Uploaded by

thakurshah1216
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views4 pages

(Eng) Prac - 4 DBMS

The document outlines a practice work assignment focused on SQL queries involving a student examination database. It includes tasks such as deleting records, updating student information, selecting specific data, and using aggregate functions to analyze scores. The assignment aims to enhance skills in creating and executing DML queries in SQL.

Uploaded by

thakurshah1216
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 4

Practice work №4

Queries to one table (SELECT, UPDATE, DELETE)


Objectives: To learn how to create simple queries using DML.
You have the following relationship database reflecting results of examination of students by
different subjects

Task: Realize in SQL scripts for the following tasks. Display own screens of the performed
tasks.
1) Delete one any record from the table exam_list, for example with id=7. Check the
result.
2) The student with id=4 changed the place of residence to Tashkent, Yunusobod
08/04/11. Reflect changes in the relevant table. Compare the results before and after the
update.

3) Select from the table Student all students living to Tashkent (the % creates the mask
passing any characters)

4) Show all records which applies to the subject DBMS from the table exam_list

5) Define the greatest point which was got ever by the subject Database management
system. For execution of this operation use the aggregate function "max".
SELECT max(<field_name>) FROM <table_name>
In addition to it there are also the following aggregate functions:
min – finding of the minimum value
count – determination of quantity of lines (records)
avg – finding of an arithmetic average of value
sum – finding of the total amount

6) Change the name of the column in result on "Best score by DBMS"


SELECT max(<field_name>) AS 'Max score by DBMS' FROM <table_name>

Now independently realize requests for the following tasks:


7) Select only names of all students without their id from the table Student
8) Select all records from the table Subject except the entry with id=2
9) Add to the table Subject an additional field with hours by subjects using ALTER
TABLE
10) Update all records in table Subject and add the hours for each subject. Show the
table before and after update
11) Select all exam lists of student with id=1
12) For the student with id=6 determine the lowest score he has ever received
13) For the same student with id = 6, knowing his lowest point, define the subject for
which he received this point
14) Determine the average score of students on the subject Database Management
Systems
15) Update for all students exam date on the subject of database management systems,
setting the value 01/02/2017. Show table before and after the update.
16) Determine how many people passed the exam by the subject with id = 4
17) Determine how many people were able to get "five" in a subject Database
Management Systems
18) Finally, with your own hand rate yourself score "3" on your exam list by the DMBS
subject

Tasks for ingenuity:


19) Select from the table of students records just about the girls
20) Create a query that besides the all fields of the table exam_list will contain an
additional, stated in the request field, which will reflect the rating of the student in the subject
DBMS (Since this work, we are not referring to two tables at the same time, enter the full number
of hours by hand, for example, 135)

You might also like