updated AllQuery.sql with rank points