Fix discrepencies between mctop and mcrank
Merge pull request #519 from t00thpick1/patch-2

Fix discrepencies between mctop and mcrank in sql