Question
(SQL Natural Joins/Left /Right join commands) Use a right or left outer join to find the title of the most recently published book (The Pale
(SQL Natural Joins/Left /Right join commands)
Use a right or left outer join to find the title of the most recently published book (The Pale King).
Use a left outer join to find the number of books each author has published. You must list authors who published zero books.
Use a left outer joins and except to find the names (first, middle, last) of all authors who did not publish a book in January.
drop table if exists writes; drop table if exists authors; drop table if exists books; create table authors ( firstname text, middlename text, lastname text, birthdate date, nationality text, primary key(firstname, middlename, lastname) ); create table books ( title text primary key, publish_date date ); create table writes ( firstname text, middlename text, lastname text, foreign key(firstname, middlename, lastname) references authors, title text references books, primary key(firstname, middlename, lastname, title) ); insert into authors values ('David', 'Foster', 'Wallace', '21 Feb 1962', 'American'), ('Alexander', '', 'Pushkin', '25 May 1799', 'Russian'), ('Leo', '', 'Tolstoy', '9 Sep 1828', 'Russian'), ('Fyodor', '', 'Dostoevsky', '11 Nov 1821', 'Russian'), ('Vladimir', '', 'Nabokov', '22 Apr 1899', 'Russian-American'), ('Jack', '', 'Kerouac', '12 Mar 1922', 'American'), ('Charles', '', 'Dickens', '7 Feb 1812', 'English'), ('Ford', 'Madox', 'Ford', '17 Dec 1873', 'English'), ('Anton', '', 'Chekhov', 'Jan 29 1860', 'Russian'), ('F', 'Scott', 'Fitzgerald', '24 Sep 1896', 'American'); insert into books values ('The Pale King', '15 Apr 2011'), ('Infinite Jest', '1 Feb 1996'), ('Boris Godunov', '1 Jan 1831'), ('The Death of Ivan Ilyich', '1 Jan 1886'), ('Anna Karenina', '1 Apr 1877'), ('Crime and Punishment', '1 Jan 1866'), ('The Brothers Karamazov', '1 Jan 1879'), ('Pale Fire', '1 Jan 1962'), ('Pnin', '1 Jan 1957'), ('Speak, Memory', '1 Jan 1951'), ('On the Road', '5 Sep 1957'), ('Bleak House', '1 Sep 1853'), ('Tale of Two Cities', '1 Jan 1859'), ('Great Expectations', '1 Jan 1861'), ('Oliver Twist', '1 Jan 1838'), ('Some Do Not...', '1 Jan 1924'), ('No More Parades', '1 Jan 1925'), ('A Man Could Stand Up--', '1 Jan 1926'), ('Last Post', '1 Jan 1928'), ('The Cherry Orchard', '1 Jan 1904'); insert into writes values ('David', 'Foster', 'Wallace', 'The Pale King'), ('David', 'Foster', 'Wallace', 'Infinite Jest'), ('Alexander', '', 'Pushkin', 'Boris Godunov'), ('Leo', '', 'Tolstoy', 'The Death of Ivan Ilyich'), ('Leo', '', 'Tolstoy', 'Anna Karenina'), ('Fyodor', '', 'Dostoevsky', 'Crime and Punishment'), ('Fyodor', '', 'Dostoevsky', 'The Brothers Karamazov'), ('Vladimir', '', 'Nabokov', 'Pale Fire'), ('Vladimir', '', 'Nabokov', 'Pnin'), ('Vladimir', '', 'Nabokov', 'Speak, Memory'), ('Jack', '', 'Kerouac', 'On the Road'), ('Charles', '', 'Dickens', 'Bleak House'), ('Charles', '', 'Dickens', 'Tale of Two Cities'), ('Charles', '', 'Dickens', 'Great Expectations'), ('Charles', '', 'Dickens', 'Oliver Twist'), ('Ford', 'Madox', 'Ford', 'Some Do Not...'), ('Ford', 'Madox', 'Ford', 'No More Parades'), ('Ford', 'Madox', 'Ford', 'A Man Could Stand Up--'), ('Ford', 'Madox', 'Ford', 'Last Post'), ('Anton', '', 'Chekhov', 'The Cherry Orchard');
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started