June 24, 2008 at 5:48 pm
Below is the desc:-
Authors Books
Pk Author Pk ISBN
Nationality Author
Birthdate Title
First Language Publish date
Second Language Publish date
1)write a query to retrieve all the books which was published during jan 2007 and with title containing INDIA or published in language Hindi.
2)write a query to retrieve the authors who has not published any books during the year 2006?
3)write a query to retrieve the authors who has published books on their birthdates.write this query in 2 ways(a)using joins(b)using subquery
4)write a query to retrieve the authors and the number of books published by them,only those authors who have published more than 1 book.
5)Write a query to retrieve the number of books published each year in various languages.
Regards,
--Saroj
June 24, 2008 at 7:33 pm
Please read: ... http://www.sqlservercentral.com/articles/Best+Practices/61537/
Please note that your books table appears to have two columns with the same column name -
Books
Pk ISB
Author
Title
Publish date
Publish date
(refer to above link as to how to present your tables and/data so we can attempt to do something to help you)
Using my assumptions the following MIGHT work -
SELECT Authors.Author, Books.Title, Books.PublishDate1, Books.PublishDate2, Authors.FirstLanguage,
Authors.SecondLanguage
FROM Authors INNER JOIN Books ON Authors.Author = Books.Author
WHERE Books.Title = 'LIKE%India%' OR
((Authors.FirstLanguage = 'hindu') AND (PublishDate1 >= 1/1/07 AND publishdate1 <= 1/30/07)) OR
((Authors.SecondLanguage = 'hindu') AND (PublishDate2 >=1/1/07 AND publishdate1 <= 1/30/07))
June 24, 2008 at 7:56 pm
Saroj (6/24/2008)
Below is the desc:-Authors Books
Pk Author Pk ISBN
Nationality Author
Birthdate Title
First Language Publish date
Second Language Publish date
1)write a query to retrieve all the books which was published during jan 2007 and with title containing INDIA or published in language Hindi.
2)write a query to retrieve the authors who has not published any books during the year 2006?
3)write a query to retrieve the authors who has published books on their birthdates.write this query in 2 ways(a)using joins(b)using subquery
4)write a query to retrieve the authors and the number of books published by them,only those authors who have published more than 1 book.
5)Write a query to retrieve the number of books published each year in various languages.
Regards,
--Saroj
This is homework and while I certainly don't have a problem helping folks with homework, at least show us that you've tried... after all, we won't get the "A".
--Jeff Moden
Change is inevitable... Change for the better is not.
Viewing 3 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply