A primary school would like to get some basic information about the biology textbooks we have. You are given the following two tables and a view:
CREATE TABLE textbook (
id integer PRIMARY KEY,
author_id integer,
title varchar(64),
subject varchar(32),
retail_price decimal(5, 2),
printing_cost decimal(5, 2),
year integer,
FOREIGN KEY (author_id)
REFERENCES author(id)
);
CREATE TABLE author (
id integer PRIMARY KEY,
full_name varchar(32)
);
CREATE VIEW website_textbook_author AS
SELECT t.id, full_name, title, subject, retail_price
FROM textbook t
JOIN author a
ON t.author_id = a.id;
Your task is to create a view named biology_textbook_short
. It will be based on the website_textbook_author
view and will contain the following columns for textbooks with the subject 'Biology': id
, full_name
, and title
.