Skip to main contentSkip to solution

Which of the following query from 'INVENTORY' relation will work for calculating 18% GST rounded to one decimal place for the 'Price' column?

Solution

✅ Correct Option: 4

18% GST on a price is Price×18100=Price×0.18Price \times \dfrac{18}{100} = Price \times 0.18. The function ROUND(x, n) rounds xx to nn decimal places, so n=1n = 1 gives one decimal place.

SELECT ROUND(Price * 0.18, 1) FROM INVENTORY; does both: it finds the GST amount and rounds it to one decimal place.


Option 1: the second argument is 0, so it rounds to a whole number, not one decimal place.

Option 2: the GST is correct, but there is no ROUND, so the result is not limited to one decimal place.

Option 3: it multiplies by 18 instead of 0.18, so the amount is 100 times too large.

Keyboard Shortcuts

  • Left arrow: Previous question
  • Right arrow: Next question
  • S key: Jump to solution
  • Q key: Jump to question