Suggest one (1) example of a problematic programming situation or scenario that nested loops could at least partially resolve. Justify your response.
Imagine you are tasked with tracking the orders that an online store ships out. Suggest the type of loop (i.e., definite, indefinite, a combination of loops and nesting loops) you would use for querying the database. Provide a rationale for your response.