Custom functions used in Google Sheets for ease of use and improved functionality.
SELECT
books.id, books.title, authors.first_name, authors.last_name
FROM books
INNER JOIN authors
ON books.author_id = authors.id
ORDER BY books.id
select invoice, name
from booksales
inner join customers on substr(booksales.invoice, 2, 5) = customers.id