Fix discrepencies between mctop and mcrank in sql