Welcome to ExamTopics
ExamTopics Logo
- Expert Verified, Online, Free.

Unlimited Access

Get Unlimited Contributor Access to the all ExamTopics Exams!
Take advantage of PDF Files for 1000+ Exams along with community discussions and pass IT Certification Exams Easily.

Exam 1z0-071 topic 1 question 2 discussion

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

Examine the description of the PRODUCTS table:

Which three queries use valid expressions? (Choose three.)

  • A. SELECT product_id, unit_price, S "Discount", unit_price + surcharge - discount FROM products;
  • B. SELECT product_id, (unit_price * 0.15 / (4.75 + 552.25)) FROM products;
  • C. SELECT product_id, (expiry_date - delivery_date) * 2 FROM products;
  • D. SELECT product_id, unit_price || 5 "Discount", unit_price + surcharge - discount FROM products;
  • E. SELECT product_id, expiry_date * 2 FROM products;
  • F. SELECT product_id, unit_price, unit_price + surcharge FROM products;
Show Suggested Answer Hide Answer
Suggested Answer: BCF 🗳️

Comments

Chosen Answer:
This is a voting comment (?) , you can switch to a simple comment.
Switch to a voting comment New
GunduzHuseynli
Highly Voted 1 year, 8 months ago
BCE should be correct answer cause number+varchar in this case imspossible
upvoted 6 times
extopic01
1 year, 7 months ago
Have u tried it yourself in livesql.oracle.com? Number + varchar is possible due to implicit casting, so BCF is correct.
upvoted 5 times
...
gioves28
1 year, 7 months ago
E is wrong inconsistent datatypes: expected NUMBER got DATE
upvoted 1 times
...
...
tom2992
Most Recent 2 weeks, 1 day ago
Selected Answer: BCF
A and D wrong cause they have invalid identifier "Discount". E wrong cause date can't multiple with number.
upvoted 1 times
...
Lee_jong_suk
5 months ago
BCF is correct answer Please note: date+date is not allowed
upvoted 2 times
...
TMerlo
7 months, 1 week ago
Selected Answer: BCF
It´s not a right decision plus a NUMBER with VARCHAR2 fields.
upvoted 1 times
...
jm9999
7 months, 3 weeks ago
Seems like a sketchy question, have to assume surcharge contains only numerical characters in the string for F
upvoted 3 times
...
fantastic_side_eye
10 months, 2 weeks ago
BCF The three queries that use valid expressions are: B. SELECT product_id, (unit_price * 0.15 / (4.75 + 552.25)) FROM products; C. SELECT product_id, (expiry_date - delivery_date) * 2 FROM products; F. SELECT product_id, unit_price, unit_price + surcharge FROM products; Explanation: A. This query is invalid because the alias "S" is not defined anywhere in the query. B. This query is valid. It calculates a value based on the unit price of each product using a mathematical expression. C. This query is valid. It calculates the difference between the expiry date and delivery date for each product and multiplies it by 2. D. This query is invalid because the alias "discount" is not defined anywhere in the query. E. This query is invalid because you cannot multiply a date value by a number. F. This query is valid. It selects the product ID, unit price, and the sum of the unit price and surcharge for each product.
upvoted 3 times
...
zouve
10 months, 3 weeks ago
select '2'+3 from dual; it produces the SUM correctly so F is correct
upvoted 2 times
...
Nelita
1 year ago
B-C-F IS CORRECT IF the varchar-column has stored number.
upvoted 2 times
...
Indhumathishan
1 year ago
why is D incorrect?
upvoted 2 times
...
holdfaststrongly
1 year, 7 months ago
Is "-discount" in AD supposed to be an alias for the column?
upvoted 1 times
...
MZEnuovazelanda
1 year, 8 months ago
IT is correct BCF because in the Datatype Varchar2 there may be a number. Oracle makes it an implicit cast and uses it as a number
upvoted 4 times
...
gabolka
1 year, 8 months ago
you cant multiply date, BCF correct if varchar2 is number
upvoted 4 times
Efstathia
1 year, 8 months ago
Just to say the same things in other words.... If surcharge column contains numeric values (even as varchar2 type) can be implicitly converted
upvoted 3 times
...
CyberP
11 months, 2 weeks ago
If you cant multiply date, then why you chose c ? since c the date is also multiply ?
upvoted 1 times
MySekQL
8 months ago
I'm guessing because if you subtract two dates that are relatively close, you will get a number not a date. And that CAN be multiplied.
upvoted 1 times
...
...
...
Averagenoob
1 year, 8 months ago
bce should be
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 ...