MySQL exercises "two"

Source: Internet
Author: User

1. The table is as follows:

2. Below: Start your Show

1. Check the number of all students who have high grades in the course number "1" than the course number "2";

2, the query average score is more than 60 points of the student's number and average score;

3, inquiry all students of the school number, name, number of courses selected, total;

4. Query the number of teachers containing "zi";

5, the inquiry did not learn "Lao Tzu" teacher class students of the school number, name;

6, the inquiry learned "1" and also learned the number "2" course of the students ' study number, name;

* 7, the inquiry has studied "Lao Tzu" The teacher teaches all classes The student's school number, the name;

* 8, check the course number "2" of the grade than the course number "1" of all the students of the school number, name;

9, the inquiry has the course result is less than 60 points student's study number, the name;

10, the inquiry did not study all classes of students;

11, the inquiry has at least one course and the school number for "2" students learn the same student number and name;

12, inquire at least study number for "2" students of all the other students of the class number and name;

13, Inquires and "2" number of students to study the course of the same class of other students and the name of the school;

14, the "Score" table "Lao Tzu" teacher taught the results of the course are changed to the average performance of the curriculum;

15, inquires and "2" number of students to study the course of the same class of other students and the name of the school;

16, delete the study "Mozi" Teacher class score table records;

17, according to the average score from high to low display all students "Python", "Java", "Linux" of the course scores, as shown in the following form: Students Id,,python,java,linux, effective courses, effective average score

18. Check the highest and lowest score of each section: show the following form: Course ID, highest score, lowest score

19, according to the average grades from low to high and the percentage of passing rate from high to low order

20, query different teachers teach different courses average from high to low display

21, the statistics print each section result, each score segment number: Course ID, course name, [100-85],[85-70],[70-60],[<60]

22. Check the records of the top three grades of each section: (regardless of the performance of the situation)

23. Check the number of students who have been enrolled in each course

24. Find out the number and name of all students who have only one course of study

25. Query the number of boys and girls

26. Check the list of students with the surname "Zhang"

27. Check the names of students with the same name and count the number

    - , the average score of each course is queried, the results are ranked in ascending order by average, and the average grade is the same, descending by course number .

in , query average score is greater than - number, name and average scores of all students

30 , The query course name is "Python" and the score is less than - student's name and score

   to and inquire about the course selection of all students;

+ , inquire about the results of any course in - Name , course title and score above;

- , a failed course, and arranged by course number from large to small

the , Query the course number 003 and the course scores in the Student's number and name

35. number of students seeking selected courses

$ , the name of the students who have the highest grade and their achievements in the course of the "Lao Tzu" Teacher

Panax Notoginseng , check each course and the corresponding number of elective

   - , inquiring about the student's number, course number and student achievement of the same students in different courses.

the and retrieve the student number of at least two elective courses

+ , check the course number and course name of the courses that all students have enrolled in

   A , inquire about the names of students who have not learned any of the courses taught by the "Lao Tzu" Teacher

the , check the number of students who have failed in two or more courses and their average scores

+ , search "003 "The course score is less than - , in descending order of the number of students by grade

The results of the "001" course of "002"students aredeleted.

The average score for each course is queried, and the results are sorted in ascending order by average, with the same average score, in descending order by course number

MySQL exercises "two"

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.