The Gateway to Computer Science Excellence
First time here? Checkout the FAQ!
x
0 votes
10 views

Commodity items have some positive or negative changes in their prices each week. Each trading company picks a portfolio of commodity items, that is, they have one or more items and they own some non-zero quantity of each one. The database table for this problem consists of the following two relations:

Commodity(item-number int, price-change float, week int),
Owns(company-name text, item-number int, quantity float).

Write an SQL query which returns the item-numbers of commodities for which, in any given week, the price change is greater than or equal to that of all other items and there exists at least one company selling that item only. (i.e., not selling any other item) in that week.

asked in Others by Veteran (103k points) | 10 views

Please log in or register to answer this question.



Quick search syntax
tags tag:apple
author user:martin
title title:apple
content content:apple
exclude -tag:apple
force match +apple
views views:100
score score:10
answers answers:2
is accepted isaccepted:true
is closed isclosed:true

41,063 questions
47,662 answers
147,329 comments
62,381 users