Hi also ich hab folgendes Problem. Ich soll für die Uni folgende Abfragen durchführen:
5. Find pairs of ids such that the supplier with the first id charges more for some part than the supplier with the second id.
6. Find the ids of parts(pids) supplied by at least two different suppliers.
Wir arbeiten mit folgenden Tabellen :
- suppliers:
sid
sname
address
indexes: „suppliers_pkey“ primary key, btree(sid)
- parts:
pid
pname
color
indexes: „parts_pkey“ primary key, btree(pid)
- catalog:
sid
pid
cost
indexes: „catalog_pkey“ primary key, btree(sid,pid)
!!In der Angabe wurde jedoch folgendes vorgegeben:
Solve the queries only with the basic operators(projection, selection, cartesian product/join & set operators) —> do not use aggregation/subqueries
Habe bereits stundenlang in Foren gesucht jedoch immer nur Lösungen mit subqueries gefunden.
Wäre sehr dankbar falls mir jemand helfen könnte !
5. Find pairs of ids such that the supplier with the first id charges more for some part than the supplier with the second id.
6. Find the ids of parts(pids) supplied by at least two different suppliers.
Wir arbeiten mit folgenden Tabellen :
- suppliers:
sid
sname
address
indexes: „suppliers_pkey“ primary key, btree(sid)
- parts:
pid
pname
color
indexes: „parts_pkey“ primary key, btree(pid)
- catalog:
sid
pid
cost
indexes: „catalog_pkey“ primary key, btree(sid,pid)
!!In der Angabe wurde jedoch folgendes vorgegeben:
Solve the queries only with the basic operators(projection, selection, cartesian product/join & set operators) —> do not use aggregation/subqueries
Habe bereits stundenlang in Foren gesucht jedoch immer nur Lösungen mit subqueries gefunden.
Wäre sehr dankbar falls mir jemand helfen könnte !