Aufgabe 2a:
SELECT
*
FROM
toy_info
Where
color =
"blue"
Or
color =
"white"
Aufgabe 2b:
SELECT
sum
(inventory)
,toy
,color
as
Anzahl
From
store_inventory,
toy_info
Where
toy_info.toy_id=store_inventory.toy_id
Group
By
toy
,color
Order
by
toy
Aufgabe 2c:
SELECT
address, toy, color,
sum
(cost*inventory)
From
toy_info, store_inventory, store_info
Where
toy_info.toy_id=store_inventory.toy_id
And
store_info.store_id=store_inventory.store_id
And
manager <> “Gordon”
Group
by
address, toy, color
Select
s.store_id, s.manager,
sum
(t.cost*i.inventory)
as
Warenwert
From
store_info s, toy_info t, store_inventory i
Where
s.store_id=i.store_id
And
t.toy_id=i.toy_id
And
manager<>
"Gordon"
Group
by
s.store_id