Paul uses this question to emphasize that no one is as wise as the Lord. You can translate this as a statement. Alternate translation: "No one has ever known the mind of the Lord, and no one has become his advisor." (See: [[rc://en/ta/man/translate/figs-rquestion]])
Here "mind" is a metonym for knowing things or thinking about things. Alternate translation: "all that the Lord knows" or "what the Lord thinks about" (See: [[rc://en/ta/man/translate/figs-metonymy]])