Exam 1z0-071 All QuestionsBrowse all questions from this exam
Question 1

Examine the description of the PROMOTIONS table:

You want to display the unique promotion costs in each promotion category.

Which two queries can be used? (Choose two.)

    Correct Answer: A, C

    To display the unique promotion costs in each promotion category, the DISTINCT keyword should be used correctly. Option A correctly uses DISTINCT to ensure unique combinations of promo_category and promo_cost, even with concatenation. Option C uses DISTINCT correctly on the combination of promo_category and promo_cost. Other options either misuse the DISTINCT keyword or do not achieve the required result of displaying unique costs for each category.

Discussion
dumpsvibeOptions: AC

The correct options for displaying the unique promotion costs in each promotion category are A and C.

Oracle_373Options: AC

-- Distinct keyword is used to select the unique values of the column/combination of columns mentioned after the DISTINCT clause. Thus Option E is incorrect , as this does not use DISTINCT clause and might include duplicates. -- Distinct should be used once in a SELECT statement and should be used IMMEDIATELY after the SELECT clause. NOT to be used before every column. Thus Options D and B are incorrect, as the positioning of the DISTINCT clause is incorrect. -- Option A and C are correct. Option A: Even though there is a string ' has ' in everyrow returned , the combination of promo_category || ' has ' || promo_cost will still be distinct. Option C: correct use case. ORDER BY clause does not affect the uniqueness in the returned result set.

Lee_jong_sukOptions: AC

Distinct is used to get distinct set of values for one or more columns mentioned in select statement

alic_alexOptions: AC

AC are correct. DB have Distinct in a wrong position in the query and E returns all because of the missing DISTINCT

Rik92Options: AC

AC are correct. DB have Distinct in a wrong position in the query and E returns all because of the missing DISTINCT

Artur1991Options: AC

ac are correct answers

fuck_indiaOptions: AC

A and C are correct.

alelejajaOptions: AC

Agree that right answers are A and C

StevenciuOptions: AC

Agree that right answers are A and C

KizTineOptions: AC

The correct answers

tradersmj1Options: AC

AC are correct

subtype11Options: CE

Option A is not correct because the query uses the "||" operator to concatenate the promo_category and promo_cost columns with a string ' has ' in between. This creates a new column "COSTS" that combines the values from the two columns in a way that is not useful for the task of displaying unique promotion costs in each promotion category. The SELECT DISTINCT statement is used on this combined column, so it will return unique values for the concatenated column, but it does not address the requirement of showing unique promotion costs in each promotion category. Additionally, it uses an ORDER BY 1 which in this case doesn't make sense since the column COSTS doesn't exist.

J4vi

I tried all the options.The ORDER BY still works in this concatenations and the table shows what its required

elchikoOptions: AC

distinct must come soon after the select keyword and only one per select statement