Iterate over all database queries