Created
September 13, 2012 10:24
-
-
Save slacken/3713423 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| update school set male = ( | |
| SELECT count( id ) | |
| FROM student | |
| WHERE gender =1 and student.school = school.id | |
| GROUP BY school | |
| ),female = ( | |
| SELECT count( id ) | |
| FROM student | |
| WHERE gender =0 and student.school = school.id | |
| GROUP BY school | |
| ) |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
update
schoolsetindex= (female/pow(male/female,1.5))