MySQL Assignment 8
Hi,
Please do the following assignment. The topic may include the questions mostly on order by and group by clauses.
1. Create a table with name students. The attributes of this table include name, register_number, Branch, Section, Absent. Please insert all the records from the following file in to the students table.
Source File : student_data
Note: If you have created the table in the previous assignment, now no need to create. You can use the same table.
2. Write a Query to print the data in ascending order by register number.
3. Write a Query to print the student details in SENSE department, The names of the students should be in order by student name.
4. Write a Query to print the total number of students (count) by department wise. (group by department).
5. Write a Query to print the total number of students (count) by department wise. (group by department). rename the column name count(branch) as count, in the above query.
6. Write a Query to print the total number of students (count) by department wise. (group by department).
7. Write a Query to print the total number of students group by branch and order by branch.
8.Write a Query to print the total number of students group by branch and order by count in descending order.
9. Write a Query to print the student name whose name starts with letter ‘s’.
10. Write a Query to print the student name whose name does not starts with letter ‘s’ and ‘p’.
11. Write a Query to print the only the register numbers who are absent in between 10 and 15.
12.Write a Query to print the only the register numbers who are absent in between 10 and 15 in descending order.
13. Create a temporary table with name ‘temp_students’ from the table students by taking the fields register_number and name.
14. Write a short note on temporary table and permanent table in MySQL.
15. Drop the Temporary table ‘temp_students’