waiting for mySQL to die

This commit is contained in:
2023-09-18 13:37:55 -05:00
parent e388e94516
commit f515bb2bd7
29 changed files with 72 additions and 0 deletions

21
Semester 2/SQL Hell Normal file
View File

@@ -0,0 +1,21 @@
/* select the snumbers and the number of parts suppled and the average qty of parts supplied for those suppliers who have a qty greater than the average qty of all suppliers. */
select avg(qty)
from spj
group by snumber;
#/ average of parts supplied */
select avg(qty)
from spj;
/* select the snumbers and the number of parts suppled and the average qty of parts supplied for those suppliers who have a qty greater than the average qty of all suppliers. */
select snumber, avg(qty)
from spj
group by snumber
having avg(qty) > (
(select avg(qty) from spj));
/* select number and the avg qty for suppliers whos range is greater tham the sum of all qty */