put sql commands in a ruby block