Get to know tables
OVER()
Computations with OVER()
Aggregate functions with OVER()
OVER() and WHERE
Revision
16. Exercise 2

Instruction

Great! Now, the more difficult exercise!

Exercise

For each purchase, show its:

  • id,
  • the name of the department,
  • the item,
  • the price,
  • the minimum price from all the rows in the query result,
  • the difference between the price and the minimum price.

Console

Code editor

Result

TableConsole