ranked: add basic stats

also "repair" of .sql