*Screams into the void*
This commit is contained in:
parent
933f6da297
commit
47594d9b53
35
Semester 2/SQL Hell pt5.txt
Normal file
35
Semester 2/SQL Hell pt5.txt
Normal file
@ -0,0 +1,35 @@
|
||||
/* list the supplier number and supplier name for suppliers who DO NOT supply any parts USE subqueries*/
|
||||
select snumber
|
||||
from supplier
|
||||
where not exists
|
||||
(select *
|
||||
from spj
|
||||
where spj.snumber = supplier.snumber);
|
||||
|
||||
|
||||
/* list the supplier number and supplier name for suppliers who DO NOT supply any parts USE subqueries*/
|
||||
select snumber
|
||||
from supplier
|
||||
where snumber in /* you may use a NOT in and and omit the FALSE at the end */
|
||||
(select *
|
||||
from spj
|
||||
where spj.snumber = supplier.snumber) = false;
|
||||
|
||||
select snumber
|
||||
from supplier
|
||||
where snumber in
|
||||
(select snumber from spj) = false;
|
||||
|
||||
/* AAAAAAAAAAAAAAAAAA */
|
||||
|
||||
select distinct snumber
|
||||
from spj as c
|
||||
where not exists
|
||||
|
||||
(select *
|
||||
from project as a cross join spj as b
|
||||
where c.snumber = b.snumber and not exists
|
||||
|
||||
(select *
|
||||
from spj
|
||||
where b.snumber=spj.snumber and a.jnumber = spj.jnumber))
|
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.
1
lamp/mysql/41df0eb8232e.pid
Normal file
1
lamp/mysql/41df0eb8232e.pid
Normal file
@ -0,0 +1 @@
|
||||
172
|
Binary file not shown.
BIN
lamp/mysql/binlog.000036
Normal file → Executable file
BIN
lamp/mysql/binlog.000036
Normal file → Executable file
Binary file not shown.
BIN
lamp/mysql/binlog.000037
Normal file
BIN
lamp/mysql/binlog.000037
Normal file
Binary file not shown.
@ -1,4 +1,3 @@
|
||||
./binlog.000020
|
||||
./binlog.000021
|
||||
./binlog.000022
|
||||
./binlog.000023
|
||||
@ -14,3 +13,4 @@
|
||||
./binlog.000034
|
||||
./binlog.000035
|
||||
./binlog.000036
|
||||
./binlog.000037
|
||||
|
0
lamp/mysql/d6a8f2b56d7f.pid
Normal file → Executable file
0
lamp/mysql/d6a8f2b56d7f.pid
Normal file → Executable file
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.
Loading…
Reference in New Issue
Block a user