206k views
0 votes
Which of the following SQL statements will display the gift that should be sent to any customer who orders the book titled THE WOK WAY TO COOK?

1) SELECT title FROM promotion
WHERE retail BETWEEN minretail AND maxretail;
2) SELECT title FROM promotion NATURAL JOIN books
WHERE retail BETWEEN minretail AND maxretail;
3) SELECT title FROM promotion JOIN books
USING retail BETWEEN minretail AND maxretail;
4) none of the above

1 Answer

2 votes

Final answer:

The correct SQL statement to display the gift associated with 'THE WOK WAY TO COOK' is not listed in the given options. The actual statement must involve a proper JOIN between the 'books' and 'promotion' tables, along with a suitable WHERE clause. Therefore, the correct answer is option 4) none of the above.

Step-by-step explanation:

The SQL statement that will display the gift that should be sent to any customer who orders the book titled THE WOK WAY TO COOK is not provided in the options given. The correct SQL would need to reference both the titles in the books table as well as the correlation with appropriate gifts in the promotion table, typically using a JOIN clause based on a common attribute that links books to their promotions, and a WHERE clause to select the specific book of interest.

None of the statements provided properly link the retail price of the book with the promotion's minimum and maximum retail values or accurately filter for the title 'THE WOK WAY TO COOK'. Therefore, the correct answer is option 4) none of the above.

User Michael Bedford
by
7.8k points