target-benchmark/spider-queries huggingface dataset:
Database: book_1 (tables: orders, client)
Question: What are the names of clients who have never made an order?
SQL: SELECT name FROM Client EXCEPT SELECT T1.name FROM Client AS T1 JOIN Orders AS T2 ON T1.idClient  =  T2.idClient
Database: book_1 (tables: book)
Question: What is the maximum and the minimum sale price?
SQL: SELECT max(saleprice) ,  min(saleprice) FROM Book
Database: book_1 (tables: book)
Question: Give the maximum and minimum sale price of books.
SQL: SELECT max(saleprice) ,  min(saleprice) FROM Book
Database: book_1 (tables: book)
Question: What is the average purchase price and the average sale price?
SQL: SELECT avg(purchaseprice) ,  avg(saleprice) FROM Book
Database: book_1 (tables: book)
Question: Give the average purchase price and average sale price for books.
SQL: SELECT avg(purchaseprice) ,  avg(saleprice) FROM Book
Database: book_1 (tables: book)
Question: What is the maximum difference between the sale price and purchase price?
SQL: SELECT max(saleprice - purchaseprice) FROM Book
Database: book_1 (tables: book)
Question: Return the largest difference in sale price and purchase price.
SQL: SELECT max(saleprice - purchaseprice) FROM Book
Database: book_1 (tables: book)
Question: List all book titles which have sale prices higher than the average.
SQL: SELECT title FROM book WHERE saleprice  >  (SELECT avg(saleprice) FROM book)
Database: book_1 (tables: book)
Question: What are the titles of books with sale prices above the average sale price across all books?
SQL: SELECT title FROM book WHERE saleprice  >  (SELECT avg(saleprice) FROM book)
Database: book_1 (tables: book)
Question: List all book titles which have the lowest sale price .
SQL: select title from book order by saleprice asc limit 1
Database: book_1 (tables: book)
Question: What are the titles of books that have a sale price equal to the lowest sale price across all books ?
SQL: select title from book order by saleprice asc limit 1
Database: book_1 (tables: book)
Question: List all book titles which have highest purchase prices .
SQL: select title from book order by purchaseprice  desc limit 1
Database: book_1 (tables: book)
Question: What are the titles of books with the highest purchase price across all books ?
SQL: select title from book order by purchaseprice  desc limit 1
Database: book_1 (tables: author, author_book, book)
Question: What is the average sale price of books written by George Orwell?
SQL: SELECT avg(saleprice) FROM Book AS T1 JOIN Author_book AS T2 ON T1.isbn  =  T2.isbn JOIN Author AS T3 ON T2.Author  =  T3.idAuthor WHERE T3.name  =  "George Orwell"
Database: book_1 (tables: author, author_book, book)
Question: Give the average sale price of books authored by George Orwell.
SQL: SELECT avg(saleprice) FROM Book AS T1 JOIN Author_book AS T2 ON T1.isbn  =  T2.isbn JOIN Author AS T3 ON T2.Author  =  T3.idAuthor WHERE T3.name  =  "George Orwell"
Database: book_1 (tables: author, author_book, book)
Question: What are sale prices of books written by Plato?
SQL: SELECT saleprice FROM Book AS T1 JOIN Author_book AS T2 ON T1.isbn  =  T2.isbn JOIN Author AS T3 ON T2.Author  =  T3.idAuthor WHERE T3.name  =  "Plato"
Database: book_1 (tables: author, author_book, book)
Question: Return the sale prices of books authored by Plato.
SQL: SELECT saleprice FROM Book AS T1 JOIN Author_book AS T2 ON T1.isbn  =  T2.isbn JOIN Author AS T3 ON T2.Author  =  T3.idAuthor WHERE T3.name  =  "Plato"
Database: book_1 (tables: author, author_book, book)
Question: What is the title of the book written by George Orwell that has the lowest sale price?
SQL: SELECT T1.title FROM Book AS T1 JOIN Author_book AS T2 ON T1.isbn  =  T2.isbn JOIN Author AS T3 ON T2.Author  =  T3.idAuthor WHERE T3.name  =  "George Orwell" ORDER BY T1.saleprice LIMIT 1
Database: book_1 (tables: author, author_book, book)
Question: Give the title of book by George Orwell that has the lowest saleprice.
SQL: SELECT T1.title FROM Book AS T1 JOIN Author_book AS T2 ON T1.isbn  =  T2.isbn JOIN Author AS T3 ON T2.Author  =  T3.idAuthor WHERE T3.name  =  "George Orwell" ORDER BY T1.saleprice LIMIT 1
Database: book_1 (tables: author, author_book, book)
Question: What is the title of the book written by Plato has price lower than the average sale price of all books?
SQL: SELECT T1.title FROM Book AS T1 JOIN Author_book AS T2 ON T1.isbn  =  T2.isbn JOIN Author AS T3 ON T2.Author  =  T3.idAuthor WHERE T3.name  =  "Plato" AND T1.saleprice  <  (SELECT avg(saleprice) FROM Book)
Database: book_1 (tables: author, author_book, book)
Question: Give the titles of books authored by Plato that have a sale price lower than the average sale price across all books.
SQL: SELECT T1.title FROM Book AS T1 JOIN Author_book AS T2 ON T1.isbn  =  T2.isbn JOIN Author AS T3 ON T2.Author  =  T3.idAuthor WHERE T3.name  =  "Plato" AND T1.saleprice  <  (SELECT avg(saleprice) FROM Book)
Database: book_1 (tables: author, author_book, book)
Question: Who is the author of the book "Pride and Prejudice"?
SQL: SELECT T3.name FROM Book AS T1 JOIN Author_book AS T2 ON T1.isbn  =  T2.isbn JOIN Author AS T3 ON T2.Author  =  T3.idAuthor WHERE T1.title  =  "Pride and Prejudice"
Database: book_1 (tables: author, author_book, book)
Question: Give the name of the author who wrote the book titled Pride and Prejudice.
SQL: SELECT T3.name FROM Book AS T1 JOIN Author_book AS T2 ON T1.isbn  =  T2.isbn JOIN Author AS T3 ON T2.Author  =  T3.idAuthor WHERE T1.title  =  "Pride and Prejudice"
Database: book_1 (tables: author, author_book, book)
Question: List titles of all books published by an author whose name contains the string 'Plato'?
SQL: SELECT T1.title FROM Book AS T1 JOIN Author_book AS T2 ON T1.isbn  =  T2.isbn JOIN Author AS T3 ON T2.Author  =  T3.idAuthor WHERE T3.name LIKE "%Plato%"
Database: book_1 (tables: author, author_book, book)
Question: What are the titles of all books written by an author with a name that contains Plato?
SQL: SELECT T1.title FROM Book AS T1 JOIN Author_book AS T2 ON T1.isbn  =  T2.isbn JOIN Author AS T3 ON T2.Author  =  T3.idAuthor WHERE T3.name LIKE "%Plato%"
Database: book_1 (tables: book, books_order)
Question: How many orders do we have for "Pride and Prejudice"?
SQL: SELECT count(*) FROM Book AS T1 JOIN Books_Order AS T2 ON T1.isbn  =  T2.isbn WHERE T1.title  =  "Pride and Prejudice"
Database: book_1 (tables: book, books_order)
Question: Return the number of orders received for Pride and Prejudice.
SQL: SELECT count(*) FROM Book AS T1 JOIN Books_Order AS T2 ON T1.isbn  =  T2.isbn WHERE T1.title  =  "Pride and Prejudice"
Database: book_1 (tables: book, books_order)
Question: Show ids for orders including both "Pride and Prejudice" and "The Little Prince".
SQL: SELECT idOrder FROM Book AS T1 JOIN Books_Order AS T2 ON T1.isbn  =  T2.isbn WHERE T1.title  =  "Pride and Prejudice" INTERSECT SELECT idOrder FROM Book AS T1 JOIN Books_Order AS T2 ON T1.isbn  =  T2.isbn WHERE T1.title  =  "The Little Prince"
Database: book_1 (tables: book, books_order)
Question: What are the order ids for orders that include both Pride and Prejudice and The Little Prince?
SQL: SELECT idOrder FROM Book AS T1 JOIN Books_Order AS T2 ON T1.isbn  =  T2.isbn WHERE T1.title  =  "Pride and Prejudice" INTERSECT SELECT idOrder FROM Book AS T1 JOIN Books_Order AS T2 ON T1.isbn  =  T2.isbn WHERE T1.title  =  "The Little Prince"
Database: book_1 (tables: orders, client, books_order)
Question: Show all book isbns which were ordered by both client Peter Doe and client James Smith.
SQL: SELECT T2.isbn FROM Orders AS T1 JOIN Books_Order AS T2 ON T1.idOrder  =  T2.idOrder JOIN Client AS T3 ON T1.idClient  =  T3.idClient WHERE T3.name  =  "Peter Doe" INTERSECT SELECT T2.isbn FROM Orders AS T1 JOIN Books_Order AS T2 ON T1.idOrder  =  T2.idOrder JOIN Client AS T3 ON T1.idClient  =  T3.idClient WHERE T3.name  =  "James Smith"
Database: book_1 (tables: orders, client, books_order)
Question: What are the isbns of books ordered by both clients named Peter Doe and James Smith?
SQL: SELECT T2.isbn FROM Orders AS T1 JOIN Books_Order AS T2 ON T1.idOrder  =  T2.idOrder JOIN Client AS T3 ON T1.idClient  =  T3.idClient WHERE T3.name  =  "Peter Doe" INTERSECT SELECT T2.isbn FROM Orders AS T1 JOIN Books_Order AS T2 ON T1.idOrder  =  T2.idOrder JOIN Client AS T3 ON T1.idClient  =  T3.idClient WHERE T3.name  =  "James Smith"
Database: book_1 (tables: orders, book, client, books_order)
Question: Find the title of books which are ordered by client Peter Doe but not client James Smith.
SQL: SELECT T4.title FROM Orders AS T1 JOIN Books_Order AS T2 ON T1.idOrder  =  T2.idOrder JOIN Client AS T3 ON T1.idClient  =  T3.idClient JOIN book AS T4 ON T2.ISBN  =  T4.isbn WHERE T3.name  =  "Peter Doe" EXCEPT SELECT T4.title FROM Orders AS T1 JOIN Books_Order AS T2 ON T1.idOrder  =  T2.idOrder JOIN Client AS T3 ON T1.idClient  =  T3.idClient JOIN book AS T4 ON T2.ISBN  =  T4.isbn WHERE T3.name  =  "James Smith"
Database: book_1 (tables: orders, book, client, books_order)
Question: What are the titles of books that the client Peter Doe ordered, but the client James Smith did not?
SQL: SELECT T4.title FROM Orders AS T1 JOIN Books_Order AS T2 ON T1.idOrder  =  T2.idOrder JOIN Client AS T3 ON T1.idClient  =  T3.idClient JOIN book AS T4 ON T2.ISBN  =  T4.isbn WHERE T3.name  =  "Peter Doe" EXCEPT SELECT T4.title FROM Orders AS T1 JOIN Books_Order AS T2 ON T1.idOrder  =  T2.idOrder JOIN Client AS T3 ON T1.idClient  =  T3.idClient JOIN book AS T4 ON T2.ISBN  =  T4.isbn WHERE T3.name  =  "James Smith"
Database: book_1 (tables: orders, book, client, books_order)
Question: Show all client names who have orders for "Pride and Prejudice".
SQL: SELECT T3.name FROM Orders AS T1 JOIN Books_Order AS T2 ON T1.idOrder  =  T2.idOrder JOIN Client AS T3 ON T1.idClient  =  T3.idClient JOIN Book AS T4 ON T4.isbn  =  T2.isbn WHERE T4.title  =  "Pride and Prejudice"
Database: book_1 (tables: orders, book, client, books_order)
Question: What are the names of clients who have ordered Pride and Prejudice?
SQL: SELECT T3.name FROM Orders AS T1 JOIN Books_Order AS T2 ON T1.idOrder  =  T2.idOrder JOIN Client AS T3 ON T1.idClient  =  T3.idClient JOIN Book AS T4 ON T4.isbn  =  T2.isbn WHERE T4.title  =  "Pride and Prejudice"
Database: book_review (tables: book)
Question: How many books are there?
SQL: SELECT count(*) FROM book
Database: book_review (tables: book)
Question: List the titles of books in ascending alphabetical order.
SQL: SELECT Title FROM book ORDER BY Title ASC
Database: book_review (tables: book)
Question: List the titles of books in descending order of pages.
SQL: SELECT Title FROM book ORDER BY Pages DESC
Database: book_review (tables: book)
Question: What are the types and release dates of books?
SQL: SELECT TYPE ,  Release FROM book
Database: book_review (tables: book)
Question: What are the maximum and minimum number of chapters for each book?
SQL: SELECT max(Chapters) ,  min(Chapters) FROM book
Database: book_review (tables: book)
Question: What are the titles of books that are not "Poet"?
SQL: SELECT Title FROM book WHERE TYPE != "Poet"
Database: book_review (tables: review)
Question: What is the average rating in reviews?
SQL: SELECT avg(Rating) FROM review
Database: book_review (tables: book, review)
Question: What are the titles and ratings of books?
SQL: SELECT T1.Title ,  T2.Rating FROM book AS T1 JOIN review AS T2 ON T1.Book_ID  =  T2.Book_ID
Database: book_review (tables: book, review)
Question: What is the rating of the book with the largest number of chapters?
SQL: SELECT T2.Rating FROM book AS T1 JOIN review AS T2 ON T1.Book_ID  =  T2.Book_ID ORDER BY T1.Chapters DESC LIMIT 1
Database: book_review (tables: book, review)
Question: What is the rank of the book with the smallest number of pages?
SQL: SELECT T2.Rank FROM book AS T1 JOIN review AS T2 ON T1.Book_ID  =  T2.Book_ID ORDER BY T1.Pages ASC LIMIT 1
Database: book_review (tables: book, review)
Question: What is the title of the book with the highest rank in the review?
SQL: SELECT T1.Title FROM book AS T1 JOIN review AS T2 ON T1.Book_ID  =  T2.Book_ID ORDER BY T2.Rank LIMIT 1
Database: book_review (tables: book, review)
Question: What is the average number of readers for books of type "Novel"?
SQL: SELECT avg(T2.Readers_in_Million) FROM book AS T1 JOIN review AS T2 ON T1.Book_ID  =  T2.Book_ID WHERE T1.Type  =  "Novel"
Database: book_review (tables: book)
Question: For each book type return the type and the number of books of that type.
SQL: SELECT TYPE ,  COUNT(*) FROM book GROUP BY TYPE
Database: book_review (tables: book)
Question: What is the most common type of books?
SQL: SELECT TYPE FROM book GROUP BY TYPE ORDER BY COUNT(*) DESC LIMIT 1
Database: book_review (tables: book)
Question: What are the types of books that have at least three books belonging to?
SQL: SELECT TYPE FROM book GROUP BY TYPE HAVING COUNT(*)  >=  3
Database: book_review (tables: book, review)
Question: List the titles of books in ascending order of the ratings in review?
SQL: SELECT T1.Title FROM book AS T1 JOIN review AS T2 ON T1.Book_ID  =  T2.Book_ID ORDER BY T2.Rating ASC
Database: book_review (tables: book, review)
Question: List the title and audio length for all the books in descending order of the number of readers.
SQL: SELECT T1.Title ,  T1.audio FROM book AS T1 JOIN review AS T2 ON T1.Book_ID  =  T2.Book_ID ORDER BY T2.Readers_in_Million DESC
Database: book_review (tables: book, review)
Question: How many books do not have reviews?
SQL: SELECT count(*) FROM book WHERE Book_ID NOT IN (SELECT Book_ID FROM review)
Database: book_review (tables: book)
Question: Show the types of books that have both books with more than 75 chapters and books with less than 50 chapters.
SQL: SELECT TYPE FROM book WHERE Chapters  >  75 INTERSECT SELECT TYPE FROM book WHERE Chapters  <  50
Database: book_review (tables: book)
Question: How many distinct types of book are there?
SQL: SELECT count(DISTINCT TYPE) FROM book
Database: book_review (tables: book, review)
Question: What are the type and title of the books that are not rated?
SQL: SELECT TYPE ,  title FROM book EXCEPT SELECT T1.type ,  T1.title FROM book AS T1 JOIN review AS T2 ON T1.Book_ID  =  T2.Book_ID;
Database: restaurant_bills (tables: customer)
Question: How many customers are there?
SQL: SELECT count(*) FROM customer
Database: restaurant_bills (tables: customer)
Question: Count the number of customers.
SQL: SELECT count(*) FROM customer
Database: restaurant_bills (tables: customer)
Question: List the names of customers in ascending order of level of membership.
SQL: SELECT Name FROM customer ORDER BY Level_of_Membership ASC
Database: restaurant_bills (tables: customer)
Question: Sort all the customers by the level of membership in ascending order, and return the customer names.
SQL: SELECT Name FROM customer ORDER BY Level_of_Membership ASC
Database: restaurant_bills (tables: customer)
Question: What are the nationalities and card credits of customers?
SQL: SELECT Nationality ,  Card_Credit FROM customer
Database: restaurant_bills (tables: customer)
Question: Find the nationality and card credit of each customer.
SQL: SELECT Nationality ,  Card_Credit FROM customer
Database: restaurant_bills (tables: customer)
Question: Show the names of customers with nationality "England" or "Australia".
SQL: SELECT Name FROM customer WHERE Nationality  =  "England" OR Nationality  =  "Australia"
Database: restaurant_bills (tables: customer)
Question: Which customers have nationality "England" or "Australia"? Give me their names.
SQL: SELECT Name FROM customer WHERE Nationality  =  "England" OR Nationality  =  "Australia"
Database: restaurant_bills (tables: customer)
Question: What is the average card credit of customers with membership level higher than 1?
SQL: SELECT avg(Card_Credit) FROM customer WHERE Level_of_Membership  >  1
Database: restaurant_bills (tables: customer)
Question: Find the average card credit customers whose membership level is above 1.
SQL: SELECT avg(Card_Credit) FROM customer WHERE Level_of_Membership  >  1
Database: restaurant_bills (tables: customer)
Question: What is the card credit of the customer with the highest membership level?
SQL: SELECT Card_Credit FROM customer ORDER BY Level_of_Membership DESC LIMIT 1
Database: restaurant_bills (tables: customer)
Question: Find the customer with the highest membership level and return his or her card credit.
SQL: SELECT Card_Credit FROM customer ORDER BY Level_of_Membership DESC LIMIT 1
Database: restaurant_bills (tables: customer)
Question: Show different nationalities of customers, along with the number of customers of each nationality.
SQL: SELECT Nationality ,  COUNT(*) FROM customer GROUP BY Nationality
Database: restaurant_bills (tables: customer)
Question: How many customers are associated with each nationality? List the nationality and the number of customers.
SQL: SELECT Nationality ,  COUNT(*) FROM customer GROUP BY Nationality
Database: restaurant_bills (tables: customer)
Question: Show the most common nationality of customers.
SQL: SELECT Nationality FROM customer GROUP BY Nationality ORDER BY COUNT(*) DESC LIMIT 1
Database: restaurant_bills (tables: customer)
Question: Which nationality does the most customers have?
SQL: SELECT Nationality FROM customer GROUP BY Nationality ORDER BY COUNT(*) DESC LIMIT 1
Database: restaurant_bills (tables: customer)
Question: Show the nations that have both customers with card credit smaller than 50 and customers with card credit bigger than 75.
SQL: SELECT Nationality FROM customer WHERE Card_Credit  <  50 INTERSECT SELECT Nationality FROM customer WHERE Card_Credit  >  75
Database: restaurant_bills (tables: customer)
Question: Which nations have both customers with card credit above 50 and customers with card credit below 75.
SQL: SELECT Nationality FROM customer WHERE Card_Credit  <  50 INTERSECT SELECT Nationality FROM customer WHERE Card_Credit  >  75
Database: restaurant_bills (tables: customer_order, customer)
Question: Show the names of customers and names of dishes they order.
SQL: SELECT T1.Name ,  T2.Dish_Name FROM customer AS T1 JOIN customer_order AS T2 ON T1.Customer_ID  =  T2.Customer_ID
Database: restaurant_bills (tables: customer_order, customer)
Question: For each order, return the customer name and the dish name.
SQL: SELECT T1.Name ,  T2.Dish_Name FROM customer AS T1 JOIN customer_order AS T2 ON T1.Customer_ID  =  T2.Customer_ID
Database: restaurant_bills (tables: customer_order, customer)
Question: Show the names of customers and names of dishes they order, in descending order of the quantity of dish.
SQL: SELECT T1.Name ,  T2.Dish_Name FROM customer AS T1 JOIN customer_order AS T2 ON T1.Customer_ID  =  T2.Customer_ID ORDER BY T2.Quantity DESC
Database: restaurant_bills (tables: customer_order, customer)
Question: For each order, find the customer name and the dish name. Sort the result in descending order of the quantity of dish.
SQL: SELECT T1.Name ,  T2.Dish_Name FROM customer AS T1 JOIN customer_order AS T2 ON T1.Customer_ID  =  T2.Customer_ID ORDER BY T2.Quantity DESC
Database: restaurant_bills (tables: customer_order, customer)
Question: Show each customer name and the total quantities of dishes ordered by that customer.
SQL: SELECT T1.Name ,  sum(T2.Quantity) FROM customer AS T1 JOIN customer_order AS T2 ON T1.Customer_ID  =  T2.Customer_ID GROUP BY T1.Name
Database: restaurant_bills (tables: customer_order, customer)
Question: What is the total quantities of dishes ordered by each customer ? List the customer name and the total quantity .
SQL: select t1.name ,  sum(t2.quantity) from customer as t1 join customer_order as t2 on t1.customer_id  =  t2.customer_id group by t1.name
Database: restaurant_bills (tables: customer_order, customer)
Question: Show the customers with total quantity of order bigger than 1.
SQL: SELECT T1.Name FROM customer AS T1 JOIN customer_order AS T2 ON T1.Customer_ID  =  T2.Customer_ID GROUP BY T1.Name HAVING sum(T2.Quantity)  >  1
Database: restaurant_bills (tables: customer_order, customer)
Question: Which customers have total order quantity greater than 1? Give me the customer names.
SQL: SELECT T1.Name FROM customer AS T1 JOIN customer_order AS T2 ON T1.Customer_ID  =  T2.Customer_ID GROUP BY T1.Name HAVING sum(T2.Quantity)  >  1
Database: restaurant_bills (tables: branch)
Question: Show distinct managers of branches.
SQL: SELECT DISTINCT Manager FROM branch
Database: restaurant_bills (tables: branch)
Question: Who are the distinct managers of branches?
SQL: SELECT DISTINCT Manager FROM branch
Database: restaurant_bills (tables: customer_order, customer)
Question: List the names of customers that do not have any order.
SQL: SELECT name FROM customer WHERE Customer_ID NOT IN (SELECT Customer_ID FROM customer_order)
Database: restaurant_bills (tables: customer_order, customer)
Question: Which customers do not have any order? Give me the customer names.
SQL: SELECT name FROM customer WHERE Customer_ID NOT IN (SELECT Customer_ID FROM customer_order)
Database: club_leader (tables: member)
Question: How many members are there?
SQL: SELECT count(*) FROM member
Database: club_leader (tables: member)
Question: List the names of members in ascending order of age.
SQL: SELECT Name FROM member ORDER BY Age ASC
Database: club_leader (tables: member)
Question: What are the names and nationalities of the members?
SQL: SELECT Name ,  Nationality FROM member
Database: club_leader (tables: member)
Question: List the names of members whose nationality is not `` England '' .
SQL: select name from member where nationality != "england"
Database: club_leader (tables: member)
Question: Show the names of members whose age is either 19 or 20.
SQL: SELECT Name FROM member WHERE Age  =  19 OR Age  =  20
Database: club_leader (tables: member)
Question: What is the name of the oldest member?
SQL: SELECT Name FROM member ORDER BY Age DESC LIMIT 1
Database: club_leader (tables: member)
Question: Show different nationalities along with the number of members of each nationality.
SQL: SELECT Nationality ,  COUNT(*) FROM member GROUP BY Nationality
Database: club_leader (tables: member)
Question: Please show the most common nationality of members.
SQL: SELECT Nationality ,  COUNT(*) FROM member GROUP BY Nationality ORDER BY COUNT(*) DESC LIMIT 1
Database: club_leader (tables: member)
Question: Show the nations that have at least two members.
SQL: SELECT Nationality FROM member GROUP BY Nationality HAVING COUNT(*)  >=  2
Database: club_leader (tables: club_leader, member, club)
Question: Show the names of club leaders and the names of clubs they joined.
SQL: SELECT T3.Name ,  T2.Club_Name FROM club_leader AS T1 JOIN club AS T2 ON T1.Club_ID  =  T2.Club_ID JOIN member AS T3 ON T1.Member_ID  =  T3.Member_ID
Database: club_leader (tables: club_leader, member, club)
Question: Show the names of club leaders of clubs with overall ranking higher than 100.
SQL: SELECT T3.Name ,  T2.Club_Name FROM club_leader AS T1 JOIN club AS T2 ON T1.Club_ID  =  T2.Club_ID JOIN member AS T3 ON T1.Member_ID  =  T3.Member_ID WHERE T2.Overall_Ranking  <  100
Database: club_leader (tables: club_leader, member, club)
Question: Show the names of club leaders that joined their club before 2018.
SQL: SELECT T3.Name ,  T2.Club_Name FROM club_leader AS T1 JOIN club AS T2 ON T1.Club_ID  =  T2.Club_ID JOIN member AS T3 ON T1.Member_ID  =  T3.Member_ID WHERE T1.Year_Join  <  2018
Database: club_leader (tables: club_leader, member, club)
Question: Show the name of the leader of the club named "Houston".
SQL: SELECT T3.Name FROM club_leader AS T1 JOIN club AS T2 ON T1.Club_ID  =  T2.Club_ID JOIN member AS T3 ON T1.Member_ID  =  T3.Member_ID WHERE T2.Club_Name  =  "Houston"
Database: club_leader (tables: club_leader, member)
Question: List the names of members that are not club leaders.
SQL: SELECT Name FROM member WHERE Member_ID NOT IN (SELECT Member_ID FROM club_leader)
Database: club_leader (tables: member)
Question: Show the nations that have both members older than 22 and members younger than 19.
SQL: SELECT Nationality FROM member WHERE Age  >  22 INTERSECT SELECT Nationality FROM member WHERE Age  <  19
Database: club_leader (tables: club_leader, member)
Question: What is the average age of all the club leaders?
SQL: SELECT avg(T2.age) FROM club_leader AS T1 JOIN member AS T2 ON T1.member_id  =  T2.member_id