Question: 7.14. Compare the following two queries: 1. SELECT COUNT(DISTINCT SUPNR) FROM PURCHASE ORDER 2. SELECT COUNT(SUPNR) FROM PURCHASE_ORDER Which of the following statements is correct?


7.14. Compare the following two queries: 1. SELECT COUNT(DISTINCT SUPNR) FROM PURCHASE ORDER 2. 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 s result query 2 because the DISTINCT operator counts only unique SUPNRs. c. Result query 1 is always 2 result query 2 because query 1 sums the number of purchase orders per sup- plier while query 2 sums the number of purchase orders in total d. Result query 1 is sometimes 2 and sometimes s result query 2 because the result depends on the num- ber of suppliers and the number of purchase orders
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
