Initial Commit

This commit is contained in:
2022-10-07 00:48:09 -03:00
commit 5f5056d65a
186 changed files with 2500 additions and 0 deletions

BIN
Assignments/As4/A4.pdf Normal file

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -0,0 +1,5 @@
select PATRON.PAT_ID, PAT_FNAME, PAT_LNAME
from PATRON
left join CHECKOUT on PATRON.PAT_ID = CHECKOUT.PAT_ID
where CHECK_NUM is NULL
order by PAT_LNAME, PAT_FNAME;

View File

@ -0,0 +1,3 @@
SELECT BOOK_YEAR
FROM BOOK
GROUP BY BOOK_YEAR;

View File

@ -0,0 +1,3 @@
select BOOK_SUBJECT
from BOOK
group by BOOK_SUBJECT;

View File

@ -0,0 +1,4 @@
select BOOK_NUM, BOOK_TITLE, BOOK_COST
from BOOK
where BOOK_COST = 59.95
order by BOOK_NUM;

View File

@ -0,0 +1,4 @@
select PAT_ID, PAT_FNAME, PAT_LNAME
from PATRON
where PAT_TYPE = 'student'
order by PAT_ID;

View File

@ -0,0 +1,4 @@
select PAT_ID, PAT_FNAME, PAT_LNAME, PAT_TYPE
from PATRON
where PAT_LNAME like 'c%'
order by PAT_ID;

View File

@ -0,0 +1,4 @@
select AU_ID, AU_FNAME, AU_LNAME
from AUTHOR
where AU_BIRTHYEAR is NULL
order by AU_ID;

View File

@ -0,0 +1,2 @@
select count(BOOK_NUM) as `Number of Books`
from BOOK;

View File

@ -0,0 +1,2 @@
select count(DISTINCT BOOK_SUBJECT) as `Number of Subjects`
from BOOK;

View File

@ -0,0 +1,3 @@
select count(BOOK_NUM) as `Available Books`
from BOOK
where PAT_ID is NULL;

View File

@ -0,0 +1,2 @@
select max(BOOK_COST) as `Most Expensive`
from BOOK;

View File

@ -0,0 +1,2 @@
select min(BOOK_COST) as `Least Expensive`
from BOOK;

View File

@ -0,0 +1,2 @@
select count(DISTINCT PAT_ID) as `DIFFERENT PATRONS`
from CHECKOUT;

View File

@ -0,0 +1,4 @@
select BOOK_SUBJECT, count(BOOK_SUBJECT) as `Books In Subject`
from BOOK
group by BOOK_SUBJECT
order by count(BOOK_SUBJECT) desc, BOOK_SUBJECT;

View File

@ -0,0 +1,4 @@
select AU_ID, count(BOOK_NUM) as `Books Written`
from WRITES
group by AU_ID
order by count(BOOK_NUM) desc, AU_ID;