Aselect subject,count(*) from books,subjects where books.subjectid=subjects.subjectid group by books.subjectid
Bselect count(*),subject from books,subjects where books.subject.id=subjects.subject.id group by subjects.subject
Cselect subject,count(*) from books,subjects where books.Authorid=subjects.Authorid group by books.subjectid,subjects.subject
Dselect subject,count(*) from books,subjects where books.BookId=subjects.BookId group by books.subjectid,subjects.subject