Add ordering to all queries