porting SQL examples to the new schema. Writing some TODOs