exam questions

Exam 1z0-071 All Questions

View all questions & answers for the 1z0-071 exam

Exam 1z0-071 topic 1 question 45 discussion

Actual exam question from Oracle's 1z0-071
Question #: 45
Topic #: 1
[All 1z0-071 Questions]

Examine this statement:

Which two statements are true? (Choose two.)

  • A. The names of employees earning the maximum salary will appear first in an unspecified order.
  • B. All remaining employee names will appear in descending order.
  • C. All remaining employee names will appear in an unspecified order.
  • D. All remaining employee names will appear in ascending order.
  • E. The names of employees earning the maximum salary will appear first in ascending order.
  • F. The names of employees earning the maximum salary will appear first in descending order.
Show Suggested Answer Hide Answer
Suggested Answer: DF 🗳️

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
yanoolthecool
Highly Voted 1 year ago
Selected Answer: AB
A. The names of employees earning the maximum salary will appear first in an unspecified order: Because if there more than one employ with the same salary the order is unspecified cuz both will use 'A' letter. B. All remaining employee names will appear in descending order. Because there is last_name DESC I should just google the answers instead of depending on the ones here...
upvoted 5 times
...
safasayed19
Most Recent 2 months, 3 weeks ago
A and B IS CORRECT ANSWER
upvoted 1 times
...
Psili
3 months, 1 week ago
Chat GPT says A, B The two correct answers are: A. The names of employees earning the maximum salary will appear first in an unspecified order. In the CASE statement, when the employee's salary matches the maximum salary (MAX(salary)), the value 'A' is assigned. Since 'A' comes before any other string alphabetically, employees with the maximum salary will be listed first. However, the order of employees with the maximum salary is unspecified unless there is a secondary sort defined for this group (which is not in this query). B. All remaining employee names will appear in descending order. After the maximum salary employees are displayed, all other employees will be ordered by their last names in descending order due to the clause ORDER BY last_name DESC.
upvoted 1 times
...
Nennuzzo
1 year ago
Selected Answer: DF
DF is correct
upvoted 2 times
...
Shrimathi
1 year, 5 months ago
DF is the correct create table emp(last_name varchar2(100), salary number); insert all into emp values('Shri',5000) into emp values('van',5000) into emp values('ben',15000) into emp values('zoo',15000) into emp values('cat',4000) select * from dual; output: zoo ben Shri cat van
upvoted 4 times
Shrimathi
1 year, 5 months ago
zoo,ben contains highest salary , it appears in descending order. And remaining orders appear in an unspecified order
upvoted 1 times
Shrimathi
1 year, 5 months ago
zoo,ben contains highest salary , it appears in descending order. And remaining orders appear in ascending order
upvoted 2 times
...
yanoolthecool
1 year, 5 months ago
I was also a bit confused as they appeared unordered, but looking closer they are, note that the 'S' is capital, which has lower ANSI value.
upvoted 2 times
...
...
...
samuele1981
1 year, 5 months ago
Selected Answer: AB
A. The names of employees earning the maximum salary will appear first in an unspecified order: Because if there more than one employ whit the same salary the order is unspecified. B. All remaining employee names will appear in descending order. Because there is last_name DESC
upvoted 2 times
...
JuciDelevati
1 year, 7 months ago
Selected Answer: DF
DF is correct
upvoted 2 times
...
Nelita
1 year, 7 months ago
Selected Answer: DE
D/E ARE CORRECT.
upvoted 1 times
...
alic_alex
1 year, 10 months ago
Selected Answer: DF
DF is correct, I have checked in DB
upvoted 2 times
...
cadcadley
1 year, 12 months ago
DF is correct
upvoted 1 times
...
dexdinh91
2 years ago
Selected Answer: DF
DF is correct
upvoted 2 times
dexdinh91
2 years ago
https://www.educba.com/sql-order-by-case/
upvoted 1 times
...
...
Ramona13
2 years, 2 months ago
BE is correct
upvoted 2 times
...
iuliana23
2 years, 2 months ago
Can someone explain me why D and F are correct?
upvoted 1 times
karols32
2 years, 2 months ago
I tested it and these answers are correct. Employees which have not a highest salary appear in ascending order and it's true because ELSE starts working and it sorts by last_name ASC(as default for sorting without giving any postfix). But the second answer, F one is interesting because where it appear, depends from a character after THEN. We have 'A' now and employees with highest salary comes first but when I replace it by 'B' employees appear from 5th row, by 'C' from 14th row. It sorts by last_name DESC, take it from end of query'.
upvoted 2 times
...
ninjax_m
1 year, 11 months ago
D. All remaining employee names will appear in ascending order. Ascending is default ordering. case - else outputs employee name that should be sorted ascending. F. The names of employees earning the maximum salary will appear first in descending order. They appear first because of 'A' , then after that they are sorted by name, but in descending order (2nd order by clause).
upvoted 2 times
...
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...
exam
Someone Bought Contributor Access for:
SY0-701
London, 1 minute ago