Question:Consider the following tables:
Books
------
BookId
BookName
AuthorId
SubjectId
PopularityRating (the popularity of the book on a scale of 1 to 10)
Language (such as French, English, German etc)
Subjects
---------
SubjectId
Subject (such as History, Geography, Mathematics etc)
Authors
--------
AuthorId
AuthorName
Country
What is the query to determine which Authors have written at least 1 book with a popularity rating of less than 5?
A select authorname from authors where authorid in (select authorid from books where popularityrating<5)
B select authorname from authors where authorid in (select authorid from books where popularityrating<=5)
C select authorname from authors where authorid in (select BookId from books where popularityrating<5)
D select authorname from authors where authorid in (select authorid from books where popularityrating in (0,5))