Chinastark/bird_dataset huggingface dataset:
Database: books
Question: What percentage of the total prices of all orders are shipped internationally?
Evidence: shipped internationally refers to method_name = 'International'; percentage = Divide (Sum(price where method_name = 'International'), Sum(price)) * 100
SQL: SELECT CAST(SUM(CASE WHEN T3.method_name = 'International' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(*) FROM cust_order AS T1 INNER JOIN order_line AS T2 ON T1.order_id = T2.order_id INNER JOIN shipping_method AS T3 ON T3.method_id = T1.shipping_method_id
Database: books
Question: List all the authors who wrote fewer pages than the average.
Evidence: author refers to author_name; who wrote fewer pages than the average refers to num_pages < AVG(num_pages)
SQL: SELECT T3.author_name FROM book AS T1 INNER JOIN book_author AS T2 ON T1.book_id = T2.book_id INNER JOIN author AS T3 ON T3.author_id = T2.author_id WHERE T1.num_pages < ( SELECT AVG(num_pages) FROM book )
Database: books
Question: Other than zero, what is the lowest price paid by a customer for an order?
Evidence: other than 0 refers to price ! = 0; lowest price paid refers to Min(price)
SQL: SELECT MIN(price) FROM order_line WHERE price <> 0
Database: books
Question: How many customers have an address that is located in the city of Villeneuve-la-Garenne?
Evidence: "Villeneuve-la-Garenne" is the city
SQL: SELECT COUNT(address_id) FROM address WHERE city = 'Villeneuve-la-Garenne'
Database: books
Question: How many authors are named Adam?
Evidence: authors named Adam refers to author_name LIKE 'Adam'
SQL: SELECT COUNT(*) FROM author WHERE author_name LIKE 'Adam%'
Database: books
Question: How many customers use a Yahoo! Mail e-mail address?
Evidence: Yahoo! Mail e-mail address refers to email LIKE '%@yahoo.com'
SQL: SELECT COUNT(*) FROM customer WHERE email LIKE '%@yahoo.com'
Database: books
Question: What are the city addresses of the customers located in the United States of America?
Evidence: "United States of America" is the country_name
SQL: SELECT DISTINCT T2.city FROM country AS T1 INNER JOIN address AS T2 ON T1.country_id = T2.country_id WHERE T1.country_name = 'United States of America'
Database: books
Question: How many orders did Marcelia Goering place in 2021 that uses the Priority Shipping method?
Evidence: in 2021 refers to substr(order_date, 1, 4) = '2021'; priority shipping method refers to method_name = 'Priority'
SQL: SELECT COUNT(*) FROM customer AS T1 INNER JOIN cust_order AS T2 ON T1.customer_id = T2.customer_id INNER JOIN shipping_method AS T3 ON T3.method_id = T2.shipping_method_id WHERE T1.first_name = 'Marcelia' AND T1.last_name = 'Goering' AND STRFTIME('%Y', T2.order_date) = '2021' AND T3.method_name = 'Priority'
Database: books
Question: Which books have the most expensive price?
Evidence: most expensive book refers to Max(price)
SQL: SELECT T2.title FROM order_line AS T1 INNER JOIN book AS T2 ON T1.book_id = T2.book_id ORDER BY T1.price DESC LIMIT 1
Database: books
Question: How many customers ordered the book titled "Anleitung zum Zickigsein"
Evidence: "Anleitung zum Zickigsein" is the title of the book
SQL: SELECT COUNT(*) FROM book AS T1 INNER JOIN order_line AS T2 ON T1.book_id = T2.book_id WHERE T1.title = 'Anleitung zum Zickigsein'
Database: books
Question: What is the most expensive price paid by a customer for the book "Bite Me If You Can (Argeneau #6)"?
Evidence: "Bite Me If You Can (Argeneau #6)" is the title of the book; most expensive price refers to Max(price)
SQL: SELECT MAX(T2.price) FROM book AS T1 INNER JOIN order_line AS T2 ON T1.book_id = T2.book_id WHERE T1.title = 'Bite Me If You Can (Argeneau #6)'
Database: books
Question: How many customers ordered the oldest book?
Evidence: oldest book refers to Min(publiation_date)
SQL: SELECT COUNT(*) FROM book AS T1 INNER JOIN order_line AS T2 ON T1.book_id = T2.book_id GROUP BY T1.publication_date ORDER BY T1.publication_date ASC LIMIT 1
Database: books
Question: List all the titles of the Spanish books published by Alfaguara.
Evidence: "Spanish" is the language_name; 'Alfaguara' is the publisher_name
SQL: SELECT T2.title FROM book_language AS T1 INNER JOIN book AS T2 ON T2.language_id = T1.language_id INNER JOIN publisher AS T3 ON T3.publisher_id = T2.publisher_id WHERE T1.language_name = 'Spanish' AND T3.publisher_name = 'Alfaguara' GROUP BY T2.title
Database: books
Question: How many customers ordered Stephen King's first book?
Evidence: "Stephen King" is the author_name; first book refers to Min(publication_date)
SQL: SELECT COUNT(T1.publication_date) FROM book AS T1 INNER JOIN book_author AS T2 ON T1.book_id = T2.book_id INNER JOIN author AS T3 ON T3.author_id = T2.author_id INNER JOIN order_line AS T4 ON T4.book_id = T1.book_id WHERE T3.author_name = 'Stephen King' ORDER BY T1.publication_date ASC LIMIT 1
Database: books
Question: What are the languages of the first two published books?
Evidence: first two published book refers to Min(publication_date); language refers to language_name
SQL: SELECT T2.language_name FROM book AS T1 INNER JOIN book_language AS T2 ON T1.language_id = T2.language_id ORDER BY T1.publication_date ASC LIMIT 2
Database: books
Question: Who published the book "The Secret Garden"?
Evidence: "The Secret Garden" is the title of the book; who published the book refers to publisher_name
SQL: SELECT DISTINCT T2.publisher_name FROM book AS T1 INNER JOIN publisher AS T2 ON T1.publisher_id = T2.publisher_id WHERE T1.title = 'The Secret Garden'
Database: books
Question: Among the books that were published by Scholastic, how many were written by J.K Rowling?
Evidence: "J.K Rowling" is the author_name; 'Scholastic' is the publisher_name
SQL: SELECT COUNT(*) FROM book AS T1 INNER JOIN publisher AS T2 ON T1.publisher_id = T2.publisher_id INNER JOIN book_author AS T3 ON T3.book_id = T1.book_id INNER JOIN author AS T4 ON T4.author_id = T3.author_id WHERE T2.publisher_name = 'Scholastic' AND T4.author_name = 'J.K. Rowling'
Database: books
Question: What are the names of all the publishers who have published at least 30 books?
Evidence: published at least 30 books refers to Count(book_id) > = 30
SQL: SELECT T2.publisher_name FROM book AS T1 INNER JOIN publisher AS T2 ON T1.publisher_id = T2.publisher_id GROUP BY T2.publisher_name HAVING COUNT(T2.publisher_name) >= 30
Database: books
Question: Indicate the last number of each street.
Evidence: street refers to street_name; last number of each street refers to Substr (street_number, -1)
SQL: SELECT street_number FROM address
Database: books
Question: Indicate the complete address of customers located in Lazaro Cardenas.
Evidence: complete address refers to street_number, street_name, city, country; "Lazaro Cardenas" is the city
SQL: SELECT street_number, street_name, city, country_id FROM address WHERE city = 'Lazaro Cardenas'
Database: books
Question: Indicate the ISBN13 of all the books that have less than 140 pages and more than 135.
Evidence: ISBN13 refers to isbn13; less than 140 pages and more than 135 refers to num_pages > 135 AND num_pages < 140;
SQL: SELECT isbn13 FROM book WHERE num_pages < 140 AND num_pages > 135
Database: books
Question: Indicate the title of the six books with the greatest potential value as collectibles.
Evidence: greatest potential value refers to Min(publication_date)
SQL: SELECT title FROM book ORDER BY publication_date ASC LIMIT 6
Database: books
Question: How many books were ordered in the last month of the year 2020?
Evidence: ordered in last month of the year 2020 refers to Substr(order_date, 1, 7) = '2020-12'
SQL: SELECT COUNT(*) FROM cust_order WHERE order_date LIKE '2020-12%'
Database: books
Question: Indicate the full name of all customers whose last name begins with the letter K.
Evidence: full name refers to first_name, last_name; last name begin with the letter 'K' refers to last_name LIKE 'K%'
SQL: SELECT first_name, last_name FROM customer WHERE last_name LIKE 'K%'
Database: books
Question: In which cities are the customers of Costa Rica located?
Evidence: "Costa Rica" is the country_name
SQL: SELECT T1.city FROM address AS T1 INNER JOIN country AS T2 ON T2.country_id = T1.country_id WHERE T2.country_name = 'Costa Rica'
Database: books
Question: Which customer addresses are no longer active?
Evidence: no longer active refers to address_status = 'Inactive'; customer address refers to street_number, street_name, city
SQL: SELECT DISTINCT T1.street_name FROM address AS T1 INNER JOIN customer_address AS T2 ON T1.address_id = T2.address_id INNER JOIN address_status AS T3 ON T3.status_id = T2.status_id WHERE T3.address_status = 'Inactive'
Database: books
Question: What is the full name of the customers who live in Baiyin city?
Evidence: full name refers to first_name, last_name; 'Baiyin' is the city
SQL: SELECT T3.first_name, T3.last_name FROM address AS T1 INNER JOIN customer_address AS T2 ON T1.address_id = T2.address_id INNER JOIN customer AS T3 ON T3.customer_id = T2.customer_id WHERE T1.city = 'Baiyin'
Database: books
Question: What is the email of the customers who place their orders with priority method?
Evidence: priority method refers to method_name = 'Priority'
SQL: SELECT T1.email FROM customer AS T1 INNER JOIN cust_order AS T2 ON T1.customer_id = T2.customer_id INNER JOIN shipping_method AS T3 ON T3.method_id = T2.shipping_method_id WHERE T3.method_name = 'Priority'
Database: books
Question: On what date did the customers who live at number 460 of their respective streets place their orders?
Evidence: live at number 460 refers to street_number = '460'; date the customers placed their orders refers to order_date
SQL: SELECT T1.order_date FROM cust_order AS T1 INNER JOIN address AS T2 ON T1.dest_address_id = T2.address_id WHERE T2.street_number = 460
Database: books
Question: Identify by their id all the orders that have been cancelled.
Evidence: have been cancelled refers to status_value = 'cancelled'; id refers to order_id
SQL: SELECT T2.order_id FROM order_status AS T1 INNER JOIN order_history AS T2 ON T1.status_id = T2.status_id WHERE T1.status_value = 'Cancelled'
Database: books
Question: What is the status of the orders placed on 04/10/2022?
Evidence: placed on 04/10/2022 refers to SUBSTR(order_date, 1, 10) = '2022-04-10'; status of order refers to status_value
SQL: SELECT DISTINCT T1.status_value FROM order_status AS T1 INNER JOIN order_history AS T2 ON T1.status_id = T2.status_id INNER JOIN cust_order AS T3 ON T3.order_id = T2.order_id WHERE T3.order_date LIKE '2022-04-10%'
Database: books
Question: What is the highest price at which a customer bought the book 'The Prophet'?
Evidence: "The Prophet" is the title of the book; highest price refers to Max(price)
SQL: SELECT MAX(T2.price) FROM book AS T1 INNER JOIN order_line AS T2 ON T1.book_id = T2.book_id WHERE T1.title = 'The Prophet'
Database: books
Question: On what dates were books ordered at a price of 16.54?
Evidence: price of 16.54 refers to price = 16.54; dates the book ordered refers to order_date
SQL: SELECT T1.order_date FROM cust_order AS T1 INNER JOIN order_line AS T2 ON T1.order_id = T2.order_id WHERE T2.price = 16.54
Database: books
Question: List the titles of all the books that Peter H. Smith wrote.
Evidence: "Peter H.Smit" is the author_name
SQL: SELECT T1.title FROM book AS T1 INNER JOIN book_author AS T2 ON T1.book_id = T2.book_id INNER JOIN author AS T3 ON T3.author_id = T2.author_id WHERE T3.author_name = 'Peter H. Smith'
Database: books
Question: How many books under 300 pages has HarperCollins Publishers published?
Evidence: under 300 pages refers to num_pages < 300; 'HarperCollins Publishers" is the publisher_name
SQL: SELECT COUNT(*) FROM book AS T1 INNER JOIN publisher AS T2 ON T1.publisher_id = T2.publisher_id WHERE T2.publisher_name = 'HarperCollins Publishers' AND T1.num_pages < 300
Database: books
Question: How many books have been published in Japanese?
Evidence: in Japanese refers to language_name = 'Japanese
SQL: SELECT COUNT(*) FROM book_language AS T1 INNER JOIN book AS T2 ON T1.language_id = T2.language_id WHERE T1.language_name = 'Japanese'
Database: books
Question: What is the average number of pages in the books written by Jennifer Crusie?
Evidence: "Jennifer Crusie" is the author_name; average number of pages refers to AVG(num_pages)
SQL: SELECT AVG(T1.num_pages) FROM book AS T1 INNER JOIN book_author AS T2 ON T1.book_id = T2.book_id INNER JOIN author AS T3 ON T3.author_id = T2.author_id WHERE T3.author_name = 'Jennifer Crusie'
Database: books
Question: What percentage of the orders placed by Kaleena were shipped by the international method?
Evidence: shipped by international method refers to method_name = 'International'; percentage = Divide (Sum(method_name = 'International'), Count(method_name)) * 100
SQL: SELECT CAST(SUM(CASE WHEN T3.method_name = 'International' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(*) FROM customer AS T1 INNER JOIN cust_order AS T2 ON T1.customer_id = T2.customer_id INNER JOIN shipping_method AS T3 ON T3.method_id = T2.shipping_method_id WHERE T1.first_name = 'Kaleena'
Database: books
Question: Provide the full name of the customers who have ordered the book The Sorrows of Young Werther.
Evidence: full name refers to first_name, last_name; 'The Sorrows of Young Werther' is the title of the book
SQL: SELECT T4.first_name, T4.last_name FROM book AS T1 INNER JOIN order_line AS T2 ON T1.book_id = T2.book_id INNER JOIN cust_order AS T3 ON T3.order_id = T2.order_id INNER JOIN customer AS T4 ON T4.customer_id = T3.customer_id WHERE T1.title = 'The Sorrows of Young Werther'
Database: books
Question: List every book that Ursola Purdy has ordered.
Evidence: book refers to title
SQL: SELECT T1.title FROM book AS T1 INNER JOIN order_line AS T2 ON T1.book_id = T2.book_id INNER JOIN cust_order AS T3 ON T3.order_id = T2.order_id INNER JOIN customer AS T4 ON T4.customer_id = T3.customer_id WHERE T4.first_name = 'Ursola' AND T4.last_name = 'Purdy'
Database: books
Question: Who is the author of the book with the biggest page count?
Evidence: author refers to author_name, biggest page count refers to Max(num_pages)
SQL: SELECT T3.author_name FROM book AS T1 INNER JOIN book_author AS T2 ON T1.book_id = T2.book_id INNER JOIN author AS T3 ON T3.author_id = T2.author_id ORDER BY T1.num_pages DESC LIMIT 1
Database: books
Question: How many books written by Akira Watanabe are available on Gravity?
Evidence: "Akira Watanabe" is the author_name
SQL: SELECT COUNT(*) FROM author AS T1 INNER JOIN book_author AS T2 ON T1.author_id = T2.author_id WHERE T1.author_name = 'Akira Watanabe'
Database: books
Question: Provide the full address of Ursola Purdy.
Evidence: full address refers to street_number, street_name, city, country_name
SQL: SELECT T3.street_number, T3.street_name, T3.city FROM customer AS T1 INNER JOIN customer_address AS T2 ON T1.customer_id = T2.customer_id INNER JOIN address AS T3 ON T3.address_id = T2.address_id INNER JOIN country AS T4 ON T4.country_id = T3.country_id WHERE T1.first_name = 'Ursola' AND T1.last_name = 'Purdy'
Database: books
Question: Who is the author of the book The Mystery in the Rocky Mountains?
Evidence: author refers to author_name; 'The Mystery in the Rocky Mountains' is the title of the book
SQL: SELECT T3.author_name FROM book AS T1 INNER JOIN book_author AS T2 ON T1.book_id = T2.book_id INNER JOIN author AS T3 ON T3.author_id = T2.author_id WHERE T1.title = 'The Mystery in the Rocky Mountains'
Database: books
Question: Identify the publisher of the book Girls' Night In.
Evidence: "Girls' Night In" is the title of the book; publisher is the publisher_name
SQL: SELECT T2.publisher_name FROM book AS T1 INNER JOIN publisher AS T2 ON T1.publisher_id = T2.publisher_id WHERE T1.title = 'Girls'' Night In'
Database: books
Question: Name the publisher of the oldest book.
Evidence: publisher refers to publisher_name;  oldest book refers to Min(publication_date)
SQL: SELECT T2.publisher_name FROM book AS T1 INNER JOIN publisher AS T2 ON T1.publisher_id = T2.publisher_id ORDER BY T1.publication_date ASC LIMIT 1
Database: books
Question: Identify the cost difference between Priority and Express shipping methods.
Evidence: "Priority" and "Express" are both method_name; cost difference = Subtract (Sum(cost where method_name = 'Express'), Sum(cost where method_name 'Priority'))
SQL: SELECT SUM(CASE WHEN method_name = 'Priority' THEN cost ELSE 0 END) - SUM(CASE WHEN method_name = 'Express' THEN cost ELSE 0 END) FROM shipping_method
Database: books
Question: How many orders have been cancelled in 2022?
Evidence: cancelled refers to status_value = 'Cancelled'; in 2022 refers to SUBSTR(status_date, 1, 4) = '2022'
SQL: SELECT COUNT(*) FROM order_status AS T1 INNER JOIN order_history AS T2 ON T1.status_id = T2.status_id WHERE T1.status_value = 'Cancelled' AND STRFTIME('%Y', T2.status_date) = '2022'
Database: books
Question: List all the books published by BBC Audiobooks.
Evidence: "BBC Audiobooks" refers to publisher_name; books refers to title
SQL: SELECT T1.title FROM book AS T1 INNER JOIN publisher AS T2 ON T1.publisher_id = T2.publisher_id WHERE T2.publisher_name = 'BBC Audiobooks'
Database: books
Question: How many books were published in 2017?
Evidence: published in 2017 refers to Substr(publication_date,1, 4) = '2017'
SQL: SELECT COUNT(*) FROM book WHERE STRFTIME('%Y', publication_date) = '2017'
Database: books
Question: Provide the International Standard Book Number of the book The Mystery in the Rocky Mountains.
Evidence: International Standard Book Number refers to isbn13; 'The Mystery in the Rocky Mountains' is the title of the book
SQL: SELECT isbn13 FROM book WHERE title = 'The Mystery in the Rocky Mountains'
Database: books
Question: Among all orders updated in 2022, identify the percentage that has been returned.
Evidence: order updated in 2022 refers to SUBSTR(status_date, 1, 4) = '2022'; has been returned refers to status_value = 'Returned'; percentage = Divide (Count(status_value = 'Returned'), Count(status_value)) * 100
SQL: SELECT CAST(SUM(CASE WHEN T1.status_value = 'Returned' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(*) FROM order_status AS T1 INNER JOIN order_history AS T2 ON T1.status_id = T2.status_id WHERE STRFTIME('%Y', T2.status_date) = '2022'
Database: books
Question: Among all addresses provided by customers, identify the percentage that are not in use anymore.
Evidence: address not in use refers to address_status = 'Inactive'; percentage = Divide (Count(address_status = 'Inactive'), Count(address_status)) * 100
SQL: SELECT CAST(SUM(CASE WHEN T2.address_status = 'Inactive' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(*) FROM customer_address AS T1 INNER JOIN address_status AS T2 ON T2.status_id = T1.status_id
Database: books
Question: How many pages does 'Seaward' have?
Evidence: "Seaward" is the title of the book; pages refers to num_pages
SQL: SELECT num_pages FROM book WHERE title = 'Seaward'
Database: books
Question: Who is the author of First Things First?
Evidence: "First Things First" is the title of the book; author refers to author_name
SQL: SELECT T3.author_name FROM book AS T1 INNER JOIN book_author AS T2 ON T1.book_id = T2.book_id INNER JOIN author AS T3 ON T3.author_id = T2.author_id WHERE T1.title = 'First Things First'
Database: books
Question: List all books authored by Tom Clancy.
Evidence: "Tom Clancy" is the author_name; books refers title
SQL: SELECT T1.title FROM book AS T1 INNER JOIN book_author AS T2 ON T1.book_id = T2.book_id INNER JOIN author AS T3 ON T3.author_id = T2.author_id WHERE T3.author_name = 'Tom Clancy'
Database: books
Question: Which book by Hirohiko Araki was published on 6/6/2006?
Evidence: "Hirohiko Araki" is the author_name; on 6/6/2006 refers to publication_date = '2006-06-06'; which book refers to title
SQL: SELECT T1.title FROM book AS T1 INNER JOIN book_author AS T2 ON T1.book_id = T2.book_id INNER JOIN author AS T3 ON T3.author_id = T2.author_id WHERE T3.author_name = 'Hirohiko Araki' AND T1.publication_date = '2006-06-06'
Database: books
Question: Who is the publisher of Hitchhiker's Guide To The Galaxy: The Filming of the Douglas Adams classic?
Evidence: "Hitchhiker's Guide To The Galaxy: The Filming of the Douglas Adams classic" is the title of the book; publisher refers to publisher_name
SQL: SELECT T2.publisher_name FROM book AS T1 INNER JOIN publisher AS T2 ON T1.publisher_id = T2.publisher_id WHERE T1.title = 'Hitchhiker''s Guide To The Galaxy: The Filming of the Douglas Adams classic'
Database: books
Question: List all books published by ADV Manga.
Evidence: "ADV Manga" is the publisher_name; books refers to title
SQL: SELECT T1.title FROM book AS T1 INNER JOIN publisher AS T2 ON T1.publisher_id = T2.publisher_id WHERE T2.publisher_name = 'ADV Manga'
Database: books
Question: Write the full name of the customers whose address is at 55 Dorton Pass, Huangqiao.
Evidence: full name refers to first_name, last_name; '55' is the street_number, 'Dorton Pass' is the street_name; 'Huangqiao' is the city
SQL: SELECT DISTINCT T1.first_name, T1.last_name FROM customer AS T1 INNER JOIN customer_address AS T2 ON T1.customer_id = T2.customer_id INNER JOIN address AS T3 ON T3.address_id = T2.address_id WHERE T3.street_number = 55 AND T3.street_name = 'Dorton Pass' AND T3.city = 'Huangqiao'
Database: books
Question: Which country is 9 Green Ridge Point, Arendal located at?
Evidence: "9" is the street_number; 'Green Reidge Point' is the street_name; 'Arendal' is the city
SQL: SELECT T2.country_name FROM address AS T1 INNER JOIN country AS T2 ON T2.country_id = T1.country_id WHERE T1.street_number = 9 AND T1.street_name = 'Green Ridge Point' AND T1.city = 'Arendal'
Database: books
Question: List 10 addresses located in Poland.
Evidence: "Polan" is the country_name; address refers to street_number, street_name, city
SQL: SELECT T1.street_number, T1.street_name, T1.city FROM address AS T1 INNER JOIN country AS T2 ON T2.country_id = T1.country_id WHERE T2.country_name = 'Poland' LIMIT 10
Database: books
Question: What is the shipping method ordered by Nicolette Sadler at 6/29/2020 7:40:07 PM?
Evidence: ordered at 6/29/2020 7:40:07 PM refers to order_date = '2020-06-29 19:40:07'; shipping method refers to method_name
SQL: SELECT T3.method_name FROM cust_order AS T1 INNER JOIN customer AS T2 ON T1.customer_id = T2.customer_id INNER JOIN shipping_method AS T3 ON T3.method_id = T1.shipping_method_id WHERE T2.first_name = 'Nicolette' AND T2.last_name = 'Sadler' AND T1.order_date = '2020-06-29 19:40:07'
Database: books
Question: List all books written in Arabic.
Evidence: "Arabic" is the language_name; book refers to title
SQL: SELECT T1.title FROM book AS T1 INNER JOIN book_language AS T2 ON T1.language_id = T2.language_id WHERE T2.language_name = 'Arabic'
Database: books
Question: Which language is 'El plan infinito' written in?
Evidence: "El plan infinito" is the title of the book; language refers to language_name
SQL: SELECT T2.language_name FROM book AS T1 INNER JOIN book_language AS T2 ON T1.language_id = T2.language_id WHERE T1.title = 'El plan infinito'
Database: books
Question: What percentage of books written by Hirohiko make up the number of books published by Viz Media?
Evidence: "Hirohiko Araki" is the author_name; 'Viz Media' is the publisher_name; percentage = Divide (Count(author_name = 'Hirohiko Araki'), Count(book_id)) * 100
SQL: SELECT CAST(SUM(CASE WHEN T1.author_name = 'Hirohiko Araki' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(*) FROM author AS T1 INNER JOIN book_author AS T2 ON T2.author_id = T1.author_id INNER JOIN book AS T3 ON T3.book_id = T2.book_id INNER JOIN publisher AS T4 ON T4.publisher_id = T3.publisher_id WHERE T4.publisher_name = 'VIZ Media'
Database: books
Question: What is the average number of book pages written by Zilpha Keatley Snyder?
Evidence: "Zilpha Keatley Snyder" is the author_name; average number of book pages refers to AVG(num_pages)
SQL: SELECT AVG(T3.num_pages) FROM book_author AS T1 INNER JOIN author AS T2 ON T1.author_id = T2.author_id INNER JOIN book AS T3 ON T3.book_id = T1.book_id WHERE T2.author_name = 'Zilpha Keatley Snyder'
Database: books
Question: What is the full name of customer with email ckupis4@tamu.edu?
Evidence: "ckupis4@tamu.edu" is the email of customer; full name refers to first_name, last_name
SQL: SELECT first_name, last_name FROM customer WHERE email = 'ckupis4@tamu.edu'