Jezzy Grey

Generation

text to sql syntaxFri, 17 Feb 2023

The catalog_book table has the following columns: id - id summary - description isbn - isbn author_id - Author ID title - title language_id - The language of the book The catalog_author table has the following columns: id - id first_name - First name last_name - last name date_of_birth - Date of birth date_of_death - Date of death The catalog_bookinstance table has the following columns: id - id imprint - imprint due_back - Due date back status - status book_id - book id Print the titles of the books, their authors (first and last names), a short description for the books, the language of the book. Consider only living authors who have books in the "o" status.

SELECT cb.title, ca.first_name, ca.last_name, cb.summary, cl.name FROM catalog_book cb INNER JOIN catalog_author ca ON cb.author_id=ca.id INNER JOIN catalog_language cl ON cb.language_id=cl.id INNER JOIN catalog_bookinstance cbi ON cb.id=cbi.book_id WHERE ca.date_of_death IS NULL AND cbi.status='o';

Questions about programming?Chat with your personal AI assistant