Consider the structure for book table as Book-master = {bookid, bookname, subcode-author, no_of copies, price} Write SQL queries for following:

Consider the structure for book table as Book-master = {bookid, bookname, subcode-author, no_of copies, price} Write SQL queries for following:
(i)   Display total no. of books for subject ‘DBM’
(ii)  Get authorwise list of all books.
(iii) Display all books whose prices are between Rs.200 and Rs.500
(iv) Display all books with details whose name start with ‘S’
_______________________________________________________________

(i)select sum(no_of Copies) from Book_master where subcode= ‘ DBM’;
(ii) Select SUM(no_of Copies),author from Book_master group by (author);
(iii) Select bookname from book_master where price>=200 and price <=500;
(iv) select * from book_master where bookname like ‘S%’; 

Post a Comment

0 Comments