sql and a start on workflows