Added weight schemas and a simple query to calculate rankings