I have a database with two table, lets say table Authors and Table Books. Table Authors have the following information:
-AuthorId- -Author-
AuthorId1, AuthorName1
AuthorId2, AuthorName1
Table Books:
-BookId- -BookName- -Author- -Date-
ID1, Book1, Author1, Date1
ID2, Book2, Author2, Date2
ID3, Book3, Author1, Date3
ID4, Book4, Author2, Date4
I want a SQL query that give me only the latest books writen by the authors. This one:
"SELECT B.BookName FROM B Books, A Authors WHERE A.Author = B.Author order by B.Date DESC"
give me also the older books, but I just want only the latest from each author.
Can anyone help me.
Thank you
-AuthorId- -Author-
AuthorId1, AuthorName1
AuthorId2, AuthorName1
Table Books:
-BookId- -BookName- -Author- -Date-
ID1, Book1, Author1, Date1
ID2, Book2, Author2, Date2
ID3, Book3, Author1, Date3
ID4, Book4, Author2, Date4
I want a SQL query that give me only the latest books writen by the authors. This one:
"SELECT B.BookName FROM B Books, A Authors WHERE A.Author = B.Author order by B.Date DESC"
give me also the older books, but I just want only the latest from each author.
Can anyone help me.
Thank you