AAAAAAAAAAAAAAAAAAAAAAAA

This commit is contained in:
Chloe Fontenot 🏳️‍⚧️ 2023-09-20 19:03:36 -05:00
parent f386902358
commit 4fb4cff722
26 changed files with 43 additions and 0 deletions

View File

@ -0,0 +1,41 @@
/* 1. list the snumber, sname, and pnumber for suppliers who supply parts but the condition of the joins is in the where clause */
select supplier.snumber, sname, pnumber, jnumber
from supplier, spj
where spj.snumber = supplier.snumber
/* 2. list the snumber, sname, and pnumber for suppliers USING SUBQUERIES aka nested selects */
select snumber, (select a.sname from supplier as a where a.snumber = spj.snumber)
pnumber, jnumber
from spj
where spj.snumber in
(select supplier.snumber from supplier);
/* 3. list the snumber, sname, and pnumber for suppliers USING SUBQUERIES aka nested selects */
select snumber, (select a.sname from supplier as a
where a.snumber = spj.snumber)
(select b.jname from project as b
where b.jnumber = spj.jnumber),
pnumber, jnumber
from spj
where spj.snumber in
(select supplier.snumber
from supplier);
/*4. List the snumber, sname, pnumber, jnumber and jname for suppliers who supply parts but not the condition for all joins in there WHERE clause */
select supplier.snumber, sname, spj.jnumber, jname
from supplier, spj, project
where supplier.snumber = spj.snumber AND
spj.jnumber = project.jnumber;
select * /* for i 0 to number of suppliers */
from supplier
where snumber in
(select snumber /* for j 0 to number of tuples in spj */
from spj
where jnumber IN
(select jnumber /* for K 0 to number of tuples in project */
from project)
);

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

0
lamp/mysql/2763f9de9157.pid Normal file → Executable file
View File

View File

@ -0,0 +1 @@
172

BIN
lamp/mysql/binlog.000032 Normal file → Executable file

Binary file not shown.

BIN
lamp/mysql/binlog.000033 Normal file

Binary file not shown.

View File

@ -29,3 +29,4 @@
./binlog.000030
./binlog.000031
./binlog.000032
./binlog.000033

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.