SQL changes, accoring to new schema.