Custom functions used in Google Sheets for ease of use and improved functionality.
select title, (select count(*) from Booksales where books.id = BookSales.book_id) as 'Quantity Sold' from books
I still need to handle this correlated sub-query in the WHERE portion of the statement - which is handled differently.