0% found this document useful (0 votes)
8 views2 pages

Students Data Set Project 2 SQL

The document outlines a project involving a student data set, including a table with various student details such as ID, name, course, and fees. It specifies tasks to perform on the data, including displaying records, updating fees, selecting students by course, counting students, and calculating various fee statistics. Additionally, it includes queries to filter and categorize students based on their tuition fees.

Uploaded by

Edward njoroge
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)
8 views2 pages

Students Data Set Project 2 SQL

The document outlines a project involving a student data set, including a table with various student details such as ID, name, course, and fees. It specifies tasks to perform on the data, including displaying records, updating fees, selecting students by course, counting students, and calculating various fee statistics. Additionally, it includes queries to filter and categorize students based on their tuition fees.

Uploaded by

Edward njoroge
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

Students Data set Project 2

a) Write a query that will create and insert data in the students
table As shown

Studen Fname Sname Course Registrati Tuition Exam Activit


t id on Fees fees fee y Fees

St01 Ahmed Jamaa Business 1000 22000 5000 220

St02 Siham Hassan Compute 2200 35000 5200 170


r Science

St03 Enosh Juma IT 3000 62000 3500 330

St04 Zakari Muse Accounti 620 27550 2700 330


a ng

St05 Ubah Ahmed Law 9000 90000 7000 400

St06 Walid Abdikad Medicine 800 83000 6300 600


ir

St07 Abdala Abdisal Survey 3200 35000 2000 1200


ah

St08 Susan Obado Engineeri 3000 11000 7000 1500


ng

St09 Edwar Njoroge Law 4500 72000 7100 1600


d

From the table created above perform the following tasks

1. Display all student records


2. Update tuition fee of student with ID 'St01' to 25000
3. Select the full name (first and surname) of students doing 'Law'
4. Count the number of students in the 'Computer Science' course
5. Calculate the total (SUM) of tuition fees paid by all students
6. Find the average registration fee paid
8. Get the minimum activity fee paid
9. List all students whose tuition fees are greater than 50000
10. Display each student's total fees (registration + tuition + exam +
activity)
11. using limit and offset query the table to generate only 5 records
12. using the case generate the query to show student whose tuition fees is
less than 30000(AFFORDABLE) else (NOT AFFORDABLE)

You might also like