Exp 9
Exp 9
Exp 9
PHONE VARCHAR(20),
ADDRESS VARCHAR(20));
-- 1
-- 2
TITLE VARCHAR(20),
PUBYEAR DATE,
PUBNAME varchar(20),
-- 2
-- 3
(ANAME VARCHAR(20),
BOOK_ID VARCHAR(10),
-- 3
-- 4
ADDRESS VARCHAR(50));
-- 4
-- 5
(NOOFCOPIES INTEGER,
BID VARCHAR(10),
BRANCHID VARCHAR(10),
-- 5
-- 6
-- 6
-- 7
(DATEOUT DATE,
DUEDATE DATE,
BID VARCHAR(10),
CARDNO VARCHAR(10),
-- 7
-- QUERIES
-- QUERY 1
WHERE B.BID=A.BOOK_ID
AND B.BID=C.BID
AND L.BR_ID=C.BRANCHID;
-- QUERY 2
SELECT CARDNO
FROM BOOKLENDING
GROUP BY CARDNO
HAVING COUNT(*)>3;
-- QUERY 3
WHERE BID = 3;
-- QUERY 4
SELECT PUBYEAR
FROM BOOK;
-- QUERY 5
WHERE B.BID=C.BID
AND C.BRANCHID=L.BR_ID;