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

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 (116k points) | 16 views

Please log in or register to answer this question.

Related questions

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
49,447 questions
53,651 answers
70,913 users