@Iwo you can take a look at this example. On the right side of the workflow you see how to extract image files from SQLite
About loops you can read