SQL:
1. Write a queryto retrieve the author who was
published a book at the youngest age?
2. write a query to retrieve the no. of books
published a each year in various languages?
3. write a query to retrieve no. of books published by
them only those authors who have published more than 1 book?
4. write a query to retrieve who has not published any
books during the year 2006?
5. write a query to retrieve the authors who has
published any books during the birth date write this query
in 2 ways 1)joins 2)sub query
6. write a query to retrieve all the books which was
published during jan 2007 & title containing India or
published in the language hindi?


1. table name is liberary managemnt and two column is
there one is authors and another one is books .
2.four fields will comes under authours like nationality,
birthdate ,first-language,second-language
3.four fields will comes under books like
authour,title ,language,publish date to write query using
this details

Answer Posted / sagar

Q 3) Select lb.author,count(b.books) as total_books from
books b, library_mgmt lb where b.author = lb.author group
by books having total_books >1;

Q 4) select b.author from books b where year(b.publish_date)
not in('2006');

Q5) Select b.author from books b ,author a where year
(a.birthdate) = year(b.publish_date) and a.author=b.author;

Q6) Select b.books from books b where year(b.publish_date)in
('2007') and (b.title like '%India%' or b.language='hindi');

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How to shut down the server with 'mysqladmin'?

537


What is insert query in mysql?

469


How can you import tables from a sql file into a database by using the mysql client?

538


Write a query to fetch duplicate records from a table using mysql?

496


How to use triggers to track changes in mysql?

479






What is blob and clob?

504


How do I restore a mysql database dump file in linux?

481


How to convert character strings to dates?

526


What is the default port of mysql server?

501


What are the steps required to view your mysql database?

598


What is procedure in mysql?

473


What are Heap tables?

825


How to get a version of mysql?

527


How many tables we can create in mysql database?

488


What is mysql server?

478