Compare the following two queries: Which of the following statements is correct? a. Result query 1 is

Question:

Compare the following two queries:

1. 2. SELECT COUNT(DISTINCT SUPNR) FROM PURCHASE_ORDER SELECT COUNT(SUPNR) FROM PURCHASE_ORDER

Which of the following statements is correct?

a. Result query 1 is always = result query 2 because PURCHASE_ORDER contains only unique purchase orders.

b. Result query 1 is always ≤ result query 2 because the DISTINCT operator counts only unique SUPNRs.

c. Result query 1 is always ≥ result query 2 because query 1 sums the number of purchase orders per supplier while query 2 sums the number of purchase orders in total.

d. Result query 1 is sometimes ≥ and sometimes ≤ result query 2 because the result depends on the number of suppliers and the number of purchase orders.

Fantastic news! We've Found the answer you've been seeking!

Step by Step Answer:

Related Book For  book-img-for-question
Question Posted: