Home > database >  Small white bosses genuflect is begged
Small white bosses genuflect is begged

Time:10-12

Serial number, cno course sno students student number; How to find out students' course selection rate

CodePudding user response:


 SELECT cno,COUNT (1)/(SELECT COUNT (1) the FROM table) AS elective rate 
FROM table
GROUP BY cno;

CodePudding user response:

Elective rate refers to the number one cno proportion in all cno number or select a certain number of cno, the sno, accounts for the proportion of all sno number

CodePudding user response:

If it is the second
(SELECT COUNT (1) the FROM table) which have to do is to query the total number of students with distinct row heavy
  • Related