brief_instruction stringlengths 16 224 | instruction stringlengths 687 8.77k | output stringlengths 18 577 |
|---|---|---|
Find the names and total checking and savings balances of accounts whose savings balance is higher than the average savings balance. |
-- Language PostgreSQL
-- Tables:
-- Table: accounts
columns : [['customer id', 'number'], ['name', 'text']]
-- Table: savings
columns : [['customer id', 'number'], ['balance', 'number']]
-- Table: checking
columns : [['customer id', 'number'], ['balance', 'number']]
You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL.
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.
Translate `Find the names and total checking and savings balances of accounts whose savings balance is higher than the average savings balance.` to a syntactically-correct PostgreSQL query.
| SELECT T1.name , T2.balance + T3.balance FROM accounts AS T1 JOIN checking AS T2 ON T1.custid = T2.custid JOIN savings AS T3 ON T1.custid = T3.custid WHERE T3.balance > (SELECT avg(balance) FROM savings) |
What are the names and sum of checking and savings balances for accounts with savings balances higher than the average savings balance? |
-- Language PostgreSQL
-- Tables:
-- Table: accounts
columns : [['customer id', 'number'], ['name', 'text']]
-- Table: savings
columns : [['customer id', 'number'], ['balance', 'number']]
-- Table: checking
columns : [['customer id', 'number'], ['balance', 'number']]
You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL.
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.
Translate `What are the names and sum of checking and savings balances for accounts with savings balances higher than the average savings balance?` to a syntactically-correct PostgreSQL query.
| SELECT T1.name , T2.balance + T3.balance FROM accounts AS T1 JOIN checking AS T2 ON T1.custid = T2.custid JOIN savings AS T3 ON T1.custid = T3.custid WHERE T3.balance > (SELECT avg(balance) FROM savings) |
Find the name and checking balance of the account with the lowest savings balance. |
-- Language PostgreSQL
-- Tables:
-- Table: accounts
columns : [['customer id', 'number'], ['name', 'text']]
-- Table: savings
columns : [['customer id', 'number'], ['balance', 'number']]
-- Table: checking
columns : [['customer id', 'number'], ['balance', 'number']]
You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL.
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.
Translate `Find the name and checking balance of the account with the lowest savings balance.` to a syntactically-correct PostgreSQL query.
| SELECT T1.name , T2.balance FROM accounts AS T1 JOIN checking AS T2 ON T1.custid = T2.custid JOIN savings AS T3 ON T1.custid = T3.custid ORDER BY T3.balance LIMIT 1 |
What are the names and balances of checking accounts belonging to the customer with the lowest savings balance? |
-- Language PostgreSQL
-- Tables:
-- Table: accounts
columns : [['customer id', 'number'], ['name', 'text']]
-- Table: savings
columns : [['customer id', 'number'], ['balance', 'number']]
-- Table: checking
columns : [['customer id', 'number'], ['balance', 'number']]
You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL.
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.
Translate `What are the names and balances of checking accounts belonging to the customer with the lowest savings balance?` to a syntactically-correct PostgreSQL query.
| SELECT T1.name , T2.balance FROM accounts AS T1 JOIN checking AS T2 ON T1.custid = T2.custid JOIN savings AS T3 ON T1.custid = T3.custid ORDER BY T3.balance LIMIT 1 |
Find the number of checking accounts for each account name. |
-- Language PostgreSQL
-- Tables:
-- Table: accounts
columns : [['customer id', 'number'], ['name', 'text']]
-- Table: savings
columns : [['customer id', 'number'], ['balance', 'number']]
-- Table: checking
columns : [['customer id', 'number'], ['balance', 'number']]
You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL.
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.
Translate `Find the number of checking accounts for each account name.` to a syntactically-correct PostgreSQL query.
| SELECT count(*) , T1.name FROM accounts AS T1 JOIN checking AS T2 ON T1.custid = T2.custid GROUP BY T1.name |
What are the names of customers with accounts, and how many checking accounts do each of them have? |
-- Language PostgreSQL
-- Tables:
-- Table: accounts
columns : [['customer id', 'number'], ['name', 'text']]
-- Table: savings
columns : [['customer id', 'number'], ['balance', 'number']]
-- Table: checking
columns : [['customer id', 'number'], ['balance', 'number']]
You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL.
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.
Translate `What are the names of customers with accounts, and how many checking accounts do each of them have?` to a syntactically-correct PostgreSQL query.
| SELECT count(*) , T1.name FROM accounts AS T1 JOIN checking AS T2 ON T1.custid = T2.custid GROUP BY T1.name |
Find the total saving balance for each account name. |
-- Language PostgreSQL
-- Tables:
-- Table: accounts
columns : [['customer id', 'number'], ['name', 'text']]
-- Table: savings
columns : [['customer id', 'number'], ['balance', 'number']]
-- Table: checking
columns : [['customer id', 'number'], ['balance', 'number']]
You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL.
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.
Translate `Find the total saving balance for each account name.` to a syntactically-correct PostgreSQL query.
| SELECT sum(T2.balance) , T1.name FROM accounts AS T1 JOIN savings AS T2 ON T1.custid = T2.custid GROUP BY T1.name |
What are the names of customers with accounts, and what are the total savings balances for each? |
-- Language PostgreSQL
-- Tables:
-- Table: accounts
columns : [['customer id', 'number'], ['name', 'text']]
-- Table: savings
columns : [['customer id', 'number'], ['balance', 'number']]
-- Table: checking
columns : [['customer id', 'number'], ['balance', 'number']]
You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL.
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.
Translate `What are the names of customers with accounts, and what are the total savings balances for each?` to a syntactically-correct PostgreSQL query.
| SELECT sum(T2.balance) , T1.name FROM accounts AS T1 JOIN savings AS T2 ON T1.custid = T2.custid GROUP BY T1.name |
Find the name of accounts whose checking balance is below the average checking balance. |
-- Language PostgreSQL
-- Tables:
-- Table: accounts
columns : [['customer id', 'number'], ['name', 'text']]
-- Table: savings
columns : [['customer id', 'number'], ['balance', 'number']]
-- Table: checking
columns : [['customer id', 'number'], ['balance', 'number']]
You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL.
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.
Translate `Find the name of accounts whose checking balance is below the average checking balance.` to a syntactically-correct PostgreSQL query.
| SELECT T1.name FROM accounts AS T1 JOIN checking AS T2 ON T1.custid = T2.custid WHERE T2.balance < (SELECT avg(balance) FROM checking) |
What are the names of customers with checking balances lower than the average checking balance? |
-- Language PostgreSQL
-- Tables:
-- Table: accounts
columns : [['customer id', 'number'], ['name', 'text']]
-- Table: savings
columns : [['customer id', 'number'], ['balance', 'number']]
-- Table: checking
columns : [['customer id', 'number'], ['balance', 'number']]
You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL.
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.
Translate `What are the names of customers with checking balances lower than the average checking balance?` to a syntactically-correct PostgreSQL query.
| SELECT T1.name FROM accounts AS T1 JOIN checking AS T2 ON T1.custid = T2.custid WHERE T2.balance < (SELECT avg(balance) FROM checking) |
Find the saving balance of the account with the highest checking balance. |
-- Language PostgreSQL
-- Tables:
-- Table: accounts
columns : [['customer id', 'number'], ['name', 'text']]
-- Table: savings
columns : [['customer id', 'number'], ['balance', 'number']]
-- Table: checking
columns : [['customer id', 'number'], ['balance', 'number']]
You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL.
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.
Translate `Find the saving balance of the account with the highest checking balance.` to a syntactically-correct PostgreSQL query.
| SELECT T3.balance FROM accounts AS T1 JOIN checking AS T2 ON T1.custid = T2.custid JOIN savings AS T3 ON T1.custid = T3.custid ORDER BY T2.balance DESC LIMIT 1 |
What is the savings balance of the account belonging to the customer with the highest checking balance? |
-- Language PostgreSQL
-- Tables:
-- Table: accounts
columns : [['customer id', 'number'], ['name', 'text']]
-- Table: savings
columns : [['customer id', 'number'], ['balance', 'number']]
-- Table: checking
columns : [['customer id', 'number'], ['balance', 'number']]
You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL.
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.
Translate `What is the savings balance of the account belonging to the customer with the highest checking balance?` to a syntactically-correct PostgreSQL query.
| SELECT T3.balance FROM accounts AS T1 JOIN checking AS T2 ON T1.custid = T2.custid JOIN savings AS T3 ON T1.custid = T3.custid ORDER BY T2.balance DESC LIMIT 1 |
Find the total checking and saving balance of all accounts sorted by the total balance in ascending order. |
-- Language PostgreSQL
-- Tables:
-- Table: accounts
columns : [['customer id', 'number'], ['name', 'text']]
-- Table: savings
columns : [['customer id', 'number'], ['balance', 'number']]
-- Table: checking
columns : [['customer id', 'number'], ['balance', 'number']]
You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL.
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.
Translate `Find the total checking and saving balance of all accounts sorted by the total balance in ascending order.` to a syntactically-correct PostgreSQL query.
| SELECT T1.balance + T2.balance FROM checking AS T1 JOIN savings AS T2 ON T1.custid = T2.custid ORDER BY T1.balance + T2.balance |
What is the sum of checking and savings balances for all customers, ordered by the total balance? |
-- Language PostgreSQL
-- Tables:
-- Table: accounts
columns : [['customer id', 'number'], ['name', 'text']]
-- Table: savings
columns : [['customer id', 'number'], ['balance', 'number']]
-- Table: checking
columns : [['customer id', 'number'], ['balance', 'number']]
You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL.
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.
Translate `What is the sum of checking and savings balances for all customers, ordered by the total balance?` to a syntactically-correct PostgreSQL query.
| SELECT T1.balance + T2.balance FROM checking AS T1 JOIN savings AS T2 ON T1.custid = T2.custid ORDER BY T1.balance + T2.balance |
Find the name and checking balance of the account with the lowest saving balance. |
-- Language PostgreSQL
-- Tables:
-- Table: accounts
columns : [['customer id', 'number'], ['name', 'text']]
-- Table: savings
columns : [['customer id', 'number'], ['balance', 'number']]
-- Table: checking
columns : [['customer id', 'number'], ['balance', 'number']]
You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL.
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.
Translate `Find the name and checking balance of the account with the lowest saving balance.` to a syntactically-correct PostgreSQL query.
| SELECT T2.balance , T1.name FROM accounts AS T1 JOIN checking AS T2 ON T1.custid = T2.custid JOIN savings AS T3 ON T1.custid = T3.custid ORDER BY T3.balance LIMIT 1 |
What is the name and checking balance of the account which has the lowest savings balance? |
-- Language PostgreSQL
-- Tables:
-- Table: accounts
columns : [['customer id', 'number'], ['name', 'text']]
-- Table: savings
columns : [['customer id', 'number'], ['balance', 'number']]
-- Table: checking
columns : [['customer id', 'number'], ['balance', 'number']]
You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL.
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.
Translate `What is the name and checking balance of the account which has the lowest savings balance?` to a syntactically-correct PostgreSQL query.
| SELECT T2.balance , T1.name FROM accounts AS T1 JOIN checking AS T2 ON T1.custid = T2.custid JOIN savings AS T3 ON T1.custid = T3.custid ORDER BY T3.balance LIMIT 1 |
Find the name, checking balance and saving balance of all accounts in the bank. |
-- Language PostgreSQL
-- Tables:
-- Table: accounts
columns : [['customer id', 'number'], ['name', 'text']]
-- Table: savings
columns : [['customer id', 'number'], ['balance', 'number']]
-- Table: checking
columns : [['customer id', 'number'], ['balance', 'number']]
You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL.
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.
Translate `Find the name, checking balance and saving balance of all accounts in the bank.` to a syntactically-correct PostgreSQL query.
| SELECT T2.balance , T3.balance , T1.name FROM accounts AS T1 JOIN checking AS T2 ON T1.custid = T2.custid JOIN savings AS T3 ON T1.custid = T3.custid |
What are the names, checking balances, and savings balances for all customers? |
-- Language PostgreSQL
-- Tables:
-- Table: accounts
columns : [['customer id', 'number'], ['name', 'text']]
-- Table: savings
columns : [['customer id', 'number'], ['balance', 'number']]
-- Table: checking
columns : [['customer id', 'number'], ['balance', 'number']]
You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL.
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.
Translate `What are the names, checking balances, and savings balances for all customers?` to a syntactically-correct PostgreSQL query.
| SELECT T2.balance , T3.balance , T1.name FROM accounts AS T1 JOIN checking AS T2 ON T1.custid = T2.custid JOIN savings AS T3 ON T1.custid = T3.custid |
Find the name, checking balance and savings balance of all accounts in the bank sorted by their total checking and savings balance in descending order. |
-- Language PostgreSQL
-- Tables:
-- Table: accounts
columns : [['customer id', 'number'], ['name', 'text']]
-- Table: savings
columns : [['customer id', 'number'], ['balance', 'number']]
-- Table: checking
columns : [['customer id', 'number'], ['balance', 'number']]
You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL.
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.
Translate `Find the name, checking balance and savings balance of all accounts in the bank sorted by their total checking and savings balance in descending order.` to a syntactically-correct PostgreSQL query.
| SELECT T2.balance , T3.balance , T1.name FROM accounts AS T1 JOIN checking AS T2 ON T1.custid = T2.custid JOIN savings AS T3 ON T1.custid = T3.custid ORDER BY T2.balance + T3.balance DESC |
What are the names, checking balances, and savings balances of customers, ordered by the total of checking and savings balances descending? |
-- Language PostgreSQL
-- Tables:
-- Table: accounts
columns : [['customer id', 'number'], ['name', 'text']]
-- Table: savings
columns : [['customer id', 'number'], ['balance', 'number']]
-- Table: checking
columns : [['customer id', 'number'], ['balance', 'number']]
You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL.
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.
Translate `What are the names, checking balances, and savings balances of customers, ordered by the total of checking and savings balances descending?` to a syntactically-correct PostgreSQL query.
| SELECT T2.balance , T3.balance , T1.name FROM accounts AS T1 JOIN checking AS T2 ON T1.custid = T2.custid JOIN savings AS T3 ON T1.custid = T3.custid ORDER BY T2.balance + T3.balance DESC |
Find the name of accounts whose checking balance is higher than corresponding saving balance. |
-- Language PostgreSQL
-- Tables:
-- Table: accounts
columns : [['customer id', 'number'], ['name', 'text']]
-- Table: savings
columns : [['customer id', 'number'], ['balance', 'number']]
-- Table: checking
columns : [['customer id', 'number'], ['balance', 'number']]
You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL.
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.
Translate `Find the name of accounts whose checking balance is higher than corresponding saving balance.` to a syntactically-correct PostgreSQL query.
| SELECT T1.name FROM accounts AS T1 JOIN checking AS T2 ON T1.custid = T2.custid JOIN savings AS T3 ON T1.custid = T3.custid WHERE T2.balance > T3.balance |
What are the names of customers with a higher checking balance than savings balance? |
-- Language PostgreSQL
-- Tables:
-- Table: accounts
columns : [['customer id', 'number'], ['name', 'text']]
-- Table: savings
columns : [['customer id', 'number'], ['balance', 'number']]
-- Table: checking
columns : [['customer id', 'number'], ['balance', 'number']]
You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL.
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.
Translate `What are the names of customers with a higher checking balance than savings balance?` to a syntactically-correct PostgreSQL query.
| SELECT T1.name FROM accounts AS T1 JOIN checking AS T2 ON T1.custid = T2.custid JOIN savings AS T3 ON T1.custid = T3.custid WHERE T2.balance > T3.balance |
Find the name and total checking and savings balance of the accounts whose savings balance is lower than corresponding checking balance. |
-- Language PostgreSQL
-- Tables:
-- Table: accounts
columns : [['customer id', 'number'], ['name', 'text']]
-- Table: savings
columns : [['customer id', 'number'], ['balance', 'number']]
-- Table: checking
columns : [['customer id', 'number'], ['balance', 'number']]
You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL.
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.
Translate `Find the name and total checking and savings balance of the accounts whose savings balance is lower than corresponding checking balance.` to a syntactically-correct PostgreSQL query.
| SELECT T1.name , T3.balance + T2.balance FROM accounts AS T1 JOIN checking AS T2 ON T1.custid = T2.custid JOIN savings AS T3 ON T1.custid = T3.custid WHERE T3.balance < T2.balance |
What are the names of customers who have a savings balance lower than their checking balance, and what is the total of their checking and savings balances? |
-- Language PostgreSQL
-- Tables:
-- Table: accounts
columns : [['customer id', 'number'], ['name', 'text']]
-- Table: savings
columns : [['customer id', 'number'], ['balance', 'number']]
-- Table: checking
columns : [['customer id', 'number'], ['balance', 'number']]
You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL.
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.
Translate `What are the names of customers who have a savings balance lower than their checking balance, and what is the total of their checking and savings balances?` to a syntactically-correct PostgreSQL query.
| SELECT T1.name , T3.balance + T2.balance FROM accounts AS T1 JOIN checking AS T2 ON T1.custid = T2.custid JOIN savings AS T3 ON T1.custid = T3.custid WHERE T3.balance < T2.balance |
Find the name and savings balance of the top 3 accounts with the highest saving balance sorted by savings balance in descending order. |
-- Language PostgreSQL
-- Tables:
-- Table: accounts
columns : [['customer id', 'number'], ['name', 'text']]
-- Table: savings
columns : [['customer id', 'number'], ['balance', 'number']]
-- Table: checking
columns : [['customer id', 'number'], ['balance', 'number']]
You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL.
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.
Translate `Find the name and savings balance of the top 3 accounts with the highest saving balance sorted by savings balance in descending order.` to a syntactically-correct PostgreSQL query.
| SELECT T1.name , T2.balance FROM accounts AS T1 JOIN savings AS T2 ON T1.custid = T2.custid ORDER BY T2.balance DESC LIMIT 3 |
What are names and savings balances of the three accounts with the highest savings balances? |
-- Language PostgreSQL
-- Tables:
-- Table: accounts
columns : [['customer id', 'number'], ['name', 'text']]
-- Table: savings
columns : [['customer id', 'number'], ['balance', 'number']]
-- Table: checking
columns : [['customer id', 'number'], ['balance', 'number']]
You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL.
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.
Translate `What are names and savings balances of the three accounts with the highest savings balances?` to a syntactically-correct PostgreSQL query.
| SELECT T1.name , T2.balance FROM accounts AS T1 JOIN savings AS T2 ON T1.custid = T2.custid ORDER BY T2.balance DESC LIMIT 3 |
How many main stream browsers whose market share is at least 5 exist? |
-- Language PostgreSQL
-- Tables:
-- Table: web client accelerator
columns : [['id', 'number'], ['name', 'text'], ['operating system', 'text'], ['client', 'text'], ['connection', 'text']]
-- Table: browser
columns : [['id', 'number'], ['name', 'text'], ['market share', 'number']]
-- Table: accelerator compatible browser
columns : [['accelerator id', 'number'], ['browser id', 'number'], ['compatible since year', 'number']]
You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL.
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.
Translate `How many main stream browsers whose market share is at least 5 exist?` to a syntactically-correct PostgreSQL query.
| SELECT count(*) FROM browser WHERE market_share >= 5 |
List the name of browsers in descending order by market share. |
-- Language PostgreSQL
-- Tables:
-- Table: web client accelerator
columns : [['id', 'number'], ['name', 'text'], ['operating system', 'text'], ['client', 'text'], ['connection', 'text']]
-- Table: browser
columns : [['id', 'number'], ['name', 'text'], ['market share', 'number']]
-- Table: accelerator compatible browser
columns : [['accelerator id', 'number'], ['browser id', 'number'], ['compatible since year', 'number']]
You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL.
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.
Translate `List the name of browsers in descending order by market share.` to a syntactically-correct PostgreSQL query.
| SELECT name FROM browser ORDER BY market_share DESC |
List the ids, names and market shares of all browsers. |
-- Language PostgreSQL
-- Tables:
-- Table: web client accelerator
columns : [['id', 'number'], ['name', 'text'], ['operating system', 'text'], ['client', 'text'], ['connection', 'text']]
-- Table: browser
columns : [['id', 'number'], ['name', 'text'], ['market share', 'number']]
-- Table: accelerator compatible browser
columns : [['accelerator id', 'number'], ['browser id', 'number'], ['compatible since year', 'number']]
You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL.
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.
Translate `List the ids, names and market shares of all browsers.` to a syntactically-correct PostgreSQL query.
| SELECT id , name , market_share FROM browser |
What is the maximum, minimum and average market share of the listed browsers? |
-- Language PostgreSQL
-- Tables:
-- Table: web client accelerator
columns : [['id', 'number'], ['name', 'text'], ['operating system', 'text'], ['client', 'text'], ['connection', 'text']]
-- Table: browser
columns : [['id', 'number'], ['name', 'text'], ['market share', 'number']]
-- Table: accelerator compatible browser
columns : [['accelerator id', 'number'], ['browser id', 'number'], ['compatible since year', 'number']]
You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL.
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.
Translate `What is the maximum, minimum and average market share of the listed browsers?` to a syntactically-correct PostgreSQL query.
| SELECT max(market_share) , min(market_share) , avg(market_share) FROM browser |
What is the id and market share of the browser Safari? |
-- Language PostgreSQL
-- Tables:
-- Table: web client accelerator
columns : [['id', 'number'], ['name', 'text'], ['operating system', 'text'], ['client', 'text'], ['connection', 'text']]
-- Table: browser
columns : [['id', 'number'], ['name', 'text'], ['market share', 'number']]
-- Table: accelerator compatible browser
columns : [['accelerator id', 'number'], ['browser id', 'number'], ['compatible since year', 'number']]
You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL.
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.
Translate `What is the id and market share of the browser Safari?` to a syntactically-correct PostgreSQL query.
| SELECT id , market_share FROM browser WHERE name = 'Safari' |
What are the name and os of web client accelerators that do not work with only a 'Broadband' type connection? |
-- Language PostgreSQL
-- Tables:
-- Table: web client accelerator
columns : [['id', 'number'], ['name', 'text'], ['operating system', 'text'], ['client', 'text'], ['connection', 'text']]
-- Table: browser
columns : [['id', 'number'], ['name', 'text'], ['market share', 'number']]
-- Table: accelerator compatible browser
columns : [['accelerator id', 'number'], ['browser id', 'number'], ['compatible since year', 'number']]
You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL.
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.
Translate `What are the name and os of web client accelerators that do not work with only a 'Broadband' type connection?` to a syntactically-correct PostgreSQL query.
| SELECT name , operating_system FROM web_client_accelerator WHERE CONNECTION != 'Broadband' |
What is the name of the browser that became compatible with the accelerator 'CProxy' after year 1998 ? |
-- Language PostgreSQL
-- Tables:
-- Table: web client accelerator
columns : [['id', 'number'], ['name', 'text'], ['operating system', 'text'], ['client', 'text'], ['connection', 'text']]
-- Table: browser
columns : [['id', 'number'], ['name', 'text'], ['market share', 'number']]
-- Table: accelerator compatible browser
columns : [['accelerator id', 'number'], ['browser id', 'number'], ['compatible since year', 'number']]
You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL.
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.
Translate `What is the name of the browser that became compatible with the accelerator 'CProxy' after year 1998 ?` to a syntactically-correct PostgreSQL query.
| SELECT T1.name FROM browser AS T1 JOIN accelerator_compatible_browser AS T2 ON T1.id = T2.browser_id JOIN web_client_accelerator AS T3 ON T2.accelerator_id = T3.id WHERE T3.name = 'CProxy' AND T2.compatible_since_year > 1998 |
What are the ids and names of the web accelerators that are compatible with two or more browsers? |
-- Language PostgreSQL
-- Tables:
-- Table: web client accelerator
columns : [['id', 'number'], ['name', 'text'], ['operating system', 'text'], ['client', 'text'], ['connection', 'text']]
-- Table: browser
columns : [['id', 'number'], ['name', 'text'], ['market share', 'number']]
-- Table: accelerator compatible browser
columns : [['accelerator id', 'number'], ['browser id', 'number'], ['compatible since year', 'number']]
You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL.
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.
Translate `What are the ids and names of the web accelerators that are compatible with two or more browsers?` to a syntactically-correct PostgreSQL query.
| SELECT T1.id , T1.Name FROM web_client_accelerator AS T1 JOIN accelerator_compatible_browser AS T2 ON T2.accelerator_id = T1.id GROUP BY T1.id HAVING count(*) >= 2 |
What is the id and name of the browser that is compatible with the most web accelerators? |
-- Language PostgreSQL
-- Tables:
-- Table: web client accelerator
columns : [['id', 'number'], ['name', 'text'], ['operating system', 'text'], ['client', 'text'], ['connection', 'text']]
-- Table: browser
columns : [['id', 'number'], ['name', 'text'], ['market share', 'number']]
-- Table: accelerator compatible browser
columns : [['accelerator id', 'number'], ['browser id', 'number'], ['compatible since year', 'number']]
You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL.
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.
Translate `What is the id and name of the browser that is compatible with the most web accelerators?` to a syntactically-correct PostgreSQL query.
| SELECT T1.id , T1.name FROM browser AS T1 JOIN accelerator_compatible_browser AS T2 ON T1.id = T2.browser_id GROUP BY T1.id ORDER BY count(*) DESC LIMIT 1 |
When did the web accelerator 'CACHEbox' and browser 'Internet Explorer' become compatible? |
-- Language PostgreSQL
-- Tables:
-- Table: web client accelerator
columns : [['id', 'number'], ['name', 'text'], ['operating system', 'text'], ['client', 'text'], ['connection', 'text']]
-- Table: browser
columns : [['id', 'number'], ['name', 'text'], ['market share', 'number']]
-- Table: accelerator compatible browser
columns : [['accelerator id', 'number'], ['browser id', 'number'], ['compatible since year', 'number']]
You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL.
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.
Translate `When did the web accelerator 'CACHEbox' and browser 'Internet Explorer' become compatible?` to a syntactically-correct PostgreSQL query.
| SELECT T1.compatible_since_year FROM accelerator_compatible_browser AS T1 JOIN browser AS T2 ON T1.browser_id = T2.id JOIN web_client_accelerator AS T3 ON T1.accelerator_id = T3.id WHERE T3.name = 'CACHEbox' AND T2.name = 'Internet Explorer' |
How many different kinds of clients are supported by the web clients accelerators? |
-- Language PostgreSQL
-- Tables:
-- Table: web client accelerator
columns : [['id', 'number'], ['name', 'text'], ['operating system', 'text'], ['client', 'text'], ['connection', 'text']]
-- Table: browser
columns : [['id', 'number'], ['name', 'text'], ['market share', 'number']]
-- Table: accelerator compatible browser
columns : [['accelerator id', 'number'], ['browser id', 'number'], ['compatible since year', 'number']]
You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL.
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.
Translate `How many different kinds of clients are supported by the web clients accelerators?` to a syntactically-correct PostgreSQL query.
| SELECT count(DISTINCT client) FROM web_client_accelerator |
How many accelerators are not compatible with the browsers listed ? |
-- Language PostgreSQL
-- Tables:
-- Table: web client accelerator
columns : [['id', 'number'], ['name', 'text'], ['operating system', 'text'], ['client', 'text'], ['connection', 'text']]
-- Table: browser
columns : [['id', 'number'], ['name', 'text'], ['market share', 'number']]
-- Table: accelerator compatible browser
columns : [['accelerator id', 'number'], ['browser id', 'number'], ['compatible since year', 'number']]
You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL.
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.
Translate `How many accelerators are not compatible with the browsers listed ?` to a syntactically-correct PostgreSQL query.
| SELECT count(*) FROM web_client_accelerator WHERE id NOT IN ( SELECT accelerator_id FROM accelerator_compatible_browser ); |
What distinct accelerator names are compatible with the browswers that have market share higher than 15? |
-- Language PostgreSQL
-- Tables:
-- Table: web client accelerator
columns : [['id', 'number'], ['name', 'text'], ['operating system', 'text'], ['client', 'text'], ['connection', 'text']]
-- Table: browser
columns : [['id', 'number'], ['name', 'text'], ['market share', 'number']]
-- Table: accelerator compatible browser
columns : [['accelerator id', 'number'], ['browser id', 'number'], ['compatible since year', 'number']]
You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL.
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.
Translate `What distinct accelerator names are compatible with the browswers that have market share higher than 15?` to a syntactically-correct PostgreSQL query.
| SELECT DISTINCT T1.name FROM web_client_accelerator AS T1 JOIN accelerator_compatible_browser AS T2 ON T2.accelerator_id = T1.id JOIN browser AS T3 ON T2.browser_id = T3.id WHERE T3.market_share > 15; |
List the names of the browser that are compatible with both 'CACHEbox' and 'Fasterfox'. |
-- Language PostgreSQL
-- Tables:
-- Table: web client accelerator
columns : [['id', 'number'], ['name', 'text'], ['operating system', 'text'], ['client', 'text'], ['connection', 'text']]
-- Table: browser
columns : [['id', 'number'], ['name', 'text'], ['market share', 'number']]
-- Table: accelerator compatible browser
columns : [['accelerator id', 'number'], ['browser id', 'number'], ['compatible since year', 'number']]
You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL.
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.
Translate `List the names of the browser that are compatible with both 'CACHEbox' and 'Fasterfox'.` to a syntactically-correct PostgreSQL query.
| SELECT T3.name FROM web_client_accelerator AS T1 JOIN accelerator_compatible_browser AS T2 ON T2.accelerator_id = T1.id JOIN browser AS T3 ON T2.browser_id = T3.id WHERE T1.name = 'CACHEbox' INTERSECT SELECT T3.name FROM web_client_accelerator AS T1 JOIN accelerator_compatible_browser AS T2 ON T2.accelerator_id = T1.id JOIN browser AS T3 ON T2.browser_id = T3.id WHERE T1.name = 'Fasterfox' |
Show the accelerator names and supporting operating systems that are not compatible with the browser named 'Opera'. |
-- Language PostgreSQL
-- Tables:
-- Table: web client accelerator
columns : [['id', 'number'], ['name', 'text'], ['operating system', 'text'], ['client', 'text'], ['connection', 'text']]
-- Table: browser
columns : [['id', 'number'], ['name', 'text'], ['market share', 'number']]
-- Table: accelerator compatible browser
columns : [['accelerator id', 'number'], ['browser id', 'number'], ['compatible since year', 'number']]
You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL.
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.
Translate `Show the accelerator names and supporting operating systems that are not compatible with the browser named 'Opera'.` to a syntactically-correct PostgreSQL query.
| SELECT name , operating_system FROM web_client_accelerator EXCEPT SELECT T1.name , T1.operating_system FROM web_client_accelerator AS T1 JOIN accelerator_compatible_browser AS T2 ON T2.accelerator_id = T1.id JOIN browser AS T3 ON T2.browser_id = T3.id WHERE T3.name = 'Opera' |
Which accelerator name contains substring "Opera"? |
-- Language PostgreSQL
-- Tables:
-- Table: web client accelerator
columns : [['id', 'number'], ['name', 'text'], ['operating system', 'text'], ['client', 'text'], ['connection', 'text']]
-- Table: browser
columns : [['id', 'number'], ['name', 'text'], ['market share', 'number']]
-- Table: accelerator compatible browser
columns : [['accelerator id', 'number'], ['browser id', 'number'], ['compatible since year', 'number']]
You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL.
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.
Translate `Which accelerator name contains substring "Opera"?` to a syntactically-correct PostgreSQL query.
| SELECT name FROM web_client_accelerator WHERE name LIKE "%Opera%" |
Find the number of web accelerators used for each Operating system. |
-- Language PostgreSQL
-- Tables:
-- Table: web client accelerator
columns : [['id', 'number'], ['name', 'text'], ['operating system', 'text'], ['client', 'text'], ['connection', 'text']]
-- Table: browser
columns : [['id', 'number'], ['name', 'text'], ['market share', 'number']]
-- Table: accelerator compatible browser
columns : [['accelerator id', 'number'], ['browser id', 'number'], ['compatible since year', 'number']]
You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL.
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.
Translate `Find the number of web accelerators used for each Operating system.` to a syntactically-correct PostgreSQL query.
| SELECT Operating_system , count(*) FROM web_client_accelerator GROUP BY Operating_system |
give me names of all compatible browsers and accelerators in the descending order of compatible year |
-- Language PostgreSQL
-- Tables:
-- Table: web client accelerator
columns : [['id', 'number'], ['name', 'text'], ['operating system', 'text'], ['client', 'text'], ['connection', 'text']]
-- Table: browser
columns : [['id', 'number'], ['name', 'text'], ['market share', 'number']]
-- Table: accelerator compatible browser
columns : [['accelerator id', 'number'], ['browser id', 'number'], ['compatible since year', 'number']]
You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL.
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.
Translate `give me names of all compatible browsers and accelerators in the descending order of compatible year` to a syntactically-correct PostgreSQL query.
| SELECT T2.name , T3.name FROM accelerator_compatible_browser AS T1 JOIN browser AS T2 ON T1.browser_id = T2.id JOIN web_client_accelerator AS T3 ON T1.accelerator_id = T3.id ORDER BY T1.compatible_since_year DESC |
How many wrestlers are there? |
-- Language PostgreSQL
-- Tables:
-- Table: wrestler
columns : [['wrestler id', 'number'], ['name', 'text'], ['reign', 'text'], ['days held', 'text'], ['location', 'text'], ['event', 'text']]
-- Table: elimination
columns : [['elimination id', 'text'], ['wrestler id', 'text'], ['team', 'text'], ['eliminated by', 'text'], ['elimination move', 'text'], ['time', 'text']]
You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL.
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.
Translate `How many wrestlers are there?` to a syntactically-correct PostgreSQL query.
| SELECT count(*) FROM wrestler |
Count the number of wrestlers. |
-- Language PostgreSQL
-- Tables:
-- Table: wrestler
columns : [['wrestler id', 'number'], ['name', 'text'], ['reign', 'text'], ['days held', 'text'], ['location', 'text'], ['event', 'text']]
-- Table: elimination
columns : [['elimination id', 'text'], ['wrestler id', 'text'], ['team', 'text'], ['eliminated by', 'text'], ['elimination move', 'text'], ['time', 'text']]
You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL.
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.
Translate `Count the number of wrestlers.` to a syntactically-correct PostgreSQL query.
| SELECT count(*) FROM wrestler |
List the names of wrestlers in descending order of days held. |
-- Language PostgreSQL
-- Tables:
-- Table: wrestler
columns : [['wrestler id', 'number'], ['name', 'text'], ['reign', 'text'], ['days held', 'text'], ['location', 'text'], ['event', 'text']]
-- Table: elimination
columns : [['elimination id', 'text'], ['wrestler id', 'text'], ['team', 'text'], ['eliminated by', 'text'], ['elimination move', 'text'], ['time', 'text']]
You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL.
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.
Translate `List the names of wrestlers in descending order of days held.` to a syntactically-correct PostgreSQL query.
| SELECT Name FROM wrestler ORDER BY Days_held DESC |
What are the names of the wrestlers, ordered descending by days held? |
-- Language PostgreSQL
-- Tables:
-- Table: wrestler
columns : [['wrestler id', 'number'], ['name', 'text'], ['reign', 'text'], ['days held', 'text'], ['location', 'text'], ['event', 'text']]
-- Table: elimination
columns : [['elimination id', 'text'], ['wrestler id', 'text'], ['team', 'text'], ['eliminated by', 'text'], ['elimination move', 'text'], ['time', 'text']]
You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL.
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.
Translate `What are the names of the wrestlers, ordered descending by days held?` to a syntactically-correct PostgreSQL query.
| SELECT Name FROM wrestler ORDER BY Days_held DESC |
What is the name of the wrestler with the fewest days held? |
-- Language PostgreSQL
-- Tables:
-- Table: wrestler
columns : [['wrestler id', 'number'], ['name', 'text'], ['reign', 'text'], ['days held', 'text'], ['location', 'text'], ['event', 'text']]
-- Table: elimination
columns : [['elimination id', 'text'], ['wrestler id', 'text'], ['team', 'text'], ['eliminated by', 'text'], ['elimination move', 'text'], ['time', 'text']]
You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL.
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.
Translate `What is the name of the wrestler with the fewest days held?` to a syntactically-correct PostgreSQL query.
| SELECT Name FROM wrestler ORDER BY Days_held ASC LIMIT 1 |
Return the name of the wrestler who had the lowest number of days held. |
-- Language PostgreSQL
-- Tables:
-- Table: wrestler
columns : [['wrestler id', 'number'], ['name', 'text'], ['reign', 'text'], ['days held', 'text'], ['location', 'text'], ['event', 'text']]
-- Table: elimination
columns : [['elimination id', 'text'], ['wrestler id', 'text'], ['team', 'text'], ['eliminated by', 'text'], ['elimination move', 'text'], ['time', 'text']]
You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL.
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.
Translate `Return the name of the wrestler who had the lowest number of days held.` to a syntactically-correct PostgreSQL query.
| SELECT Name FROM wrestler ORDER BY Days_held ASC LIMIT 1 |
What are the distinct reigns of wrestlers whose location is not "Tokyo,Japan" ? |
-- Language PostgreSQL
-- Tables:
-- Table: wrestler
columns : [['wrestler id', 'number'], ['name', 'text'], ['reign', 'text'], ['days held', 'text'], ['location', 'text'], ['event', 'text']]
-- Table: elimination
columns : [['elimination id', 'text'], ['wrestler id', 'text'], ['team', 'text'], ['eliminated by', 'text'], ['elimination move', 'text'], ['time', 'text']]
You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL.
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.
Translate `What are the distinct reigns of wrestlers whose location is not "Tokyo,Japan" ?` to a syntactically-correct PostgreSQL query.
| SELECT DISTINCT Reign FROM wrestler WHERE LOCATION != "Tokyo , Japan" |
Give the different reigns of wrestlers who are not located in Tokyo, Japan. |
-- Language PostgreSQL
-- Tables:
-- Table: wrestler
columns : [['wrestler id', 'number'], ['name', 'text'], ['reign', 'text'], ['days held', 'text'], ['location', 'text'], ['event', 'text']]
-- Table: elimination
columns : [['elimination id', 'text'], ['wrestler id', 'text'], ['team', 'text'], ['eliminated by', 'text'], ['elimination move', 'text'], ['time', 'text']]
You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL.
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.
Translate `Give the different reigns of wrestlers who are not located in Tokyo, Japan.` to a syntactically-correct PostgreSQL query.
| SELECT DISTINCT Reign FROM wrestler WHERE LOCATION != "Tokyo , Japan" |
What are the names and location of the wrestlers? |
-- Language PostgreSQL
-- Tables:
-- Table: wrestler
columns : [['wrestler id', 'number'], ['name', 'text'], ['reign', 'text'], ['days held', 'text'], ['location', 'text'], ['event', 'text']]
-- Table: elimination
columns : [['elimination id', 'text'], ['wrestler id', 'text'], ['team', 'text'], ['eliminated by', 'text'], ['elimination move', 'text'], ['time', 'text']]
You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL.
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.
Translate `What are the names and location of the wrestlers?` to a syntactically-correct PostgreSQL query.
| SELECT Name , LOCATION FROM wrestler |
Give the names and locations of all wrestlers. |
-- Language PostgreSQL
-- Tables:
-- Table: wrestler
columns : [['wrestler id', 'number'], ['name', 'text'], ['reign', 'text'], ['days held', 'text'], ['location', 'text'], ['event', 'text']]
-- Table: elimination
columns : [['elimination id', 'text'], ['wrestler id', 'text'], ['team', 'text'], ['eliminated by', 'text'], ['elimination move', 'text'], ['time', 'text']]
You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL.
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.
Translate `Give the names and locations of all wrestlers.` to a syntactically-correct PostgreSQL query.
| SELECT Name , LOCATION FROM wrestler |
What are the elimination moves of wrestlers whose team is "Team Orton"? |
-- Language PostgreSQL
-- Tables:
-- Table: wrestler
columns : [['wrestler id', 'number'], ['name', 'text'], ['reign', 'text'], ['days held', 'text'], ['location', 'text'], ['event', 'text']]
-- Table: elimination
columns : [['elimination id', 'text'], ['wrestler id', 'text'], ['team', 'text'], ['eliminated by', 'text'], ['elimination move', 'text'], ['time', 'text']]
You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL.
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.
Translate `What are the elimination moves of wrestlers whose team is "Team Orton"?` to a syntactically-correct PostgreSQL query.
| SELECT Elimination_Move FROM Elimination WHERE Team = "Team Orton" |
Return the elimination movies of wrestlers on Team Orton. |
-- Language PostgreSQL
-- Tables:
-- Table: wrestler
columns : [['wrestler id', 'number'], ['name', 'text'], ['reign', 'text'], ['days held', 'text'], ['location', 'text'], ['event', 'text']]
-- Table: elimination
columns : [['elimination id', 'text'], ['wrestler id', 'text'], ['team', 'text'], ['eliminated by', 'text'], ['elimination move', 'text'], ['time', 'text']]
You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL.
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.
Translate `Return the elimination movies of wrestlers on Team Orton.` to a syntactically-correct PostgreSQL query.
| SELECT Elimination_Move FROM Elimination WHERE Team = "Team Orton" |
What are the names of wrestlers and the elimination moves? |
-- Language PostgreSQL
-- Tables:
-- Table: wrestler
columns : [['wrestler id', 'number'], ['name', 'text'], ['reign', 'text'], ['days held', 'text'], ['location', 'text'], ['event', 'text']]
-- Table: elimination
columns : [['elimination id', 'text'], ['wrestler id', 'text'], ['team', 'text'], ['eliminated by', 'text'], ['elimination move', 'text'], ['time', 'text']]
You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL.
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.
Translate `What are the names of wrestlers and the elimination moves?` to a syntactically-correct PostgreSQL query.
| SELECT T2.Name , T1.Elimination_Move FROM elimination AS T1 JOIN wrestler AS T2 ON T1.Wrestler_ID = T2.Wrestler_ID |
Give the names of wrestlers and their elimination moves. |
-- Language PostgreSQL
-- Tables:
-- Table: wrestler
columns : [['wrestler id', 'number'], ['name', 'text'], ['reign', 'text'], ['days held', 'text'], ['location', 'text'], ['event', 'text']]
-- Table: elimination
columns : [['elimination id', 'text'], ['wrestler id', 'text'], ['team', 'text'], ['eliminated by', 'text'], ['elimination move', 'text'], ['time', 'text']]
You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL.
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.
Translate `Give the names of wrestlers and their elimination moves.` to a syntactically-correct PostgreSQL query.
| SELECT T2.Name , T1.Elimination_Move FROM elimination AS T1 JOIN wrestler AS T2 ON T1.Wrestler_ID = T2.Wrestler_ID |
List the names of wrestlers and the teams in elimination in descending order of days held. |
-- Language PostgreSQL
-- Tables:
-- Table: wrestler
columns : [['wrestler id', 'number'], ['name', 'text'], ['reign', 'text'], ['days held', 'text'], ['location', 'text'], ['event', 'text']]
-- Table: elimination
columns : [['elimination id', 'text'], ['wrestler id', 'text'], ['team', 'text'], ['eliminated by', 'text'], ['elimination move', 'text'], ['time', 'text']]
You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL.
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.
Translate `List the names of wrestlers and the teams in elimination in descending order of days held.` to a syntactically-correct PostgreSQL query.
| SELECT T2.Name , T1.Team FROM elimination AS T1 JOIN wrestler AS T2 ON T1.Wrestler_ID = T2.Wrestler_ID ORDER BY T2.Days_held DESC |
What are the names of wrestlers and their teams in elimination, ordered descending by days held? |
-- Language PostgreSQL
-- Tables:
-- Table: wrestler
columns : [['wrestler id', 'number'], ['name', 'text'], ['reign', 'text'], ['days held', 'text'], ['location', 'text'], ['event', 'text']]
-- Table: elimination
columns : [['elimination id', 'text'], ['wrestler id', 'text'], ['team', 'text'], ['eliminated by', 'text'], ['elimination move', 'text'], ['time', 'text']]
You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL.
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.
Translate `What are the names of wrestlers and their teams in elimination, ordered descending by days held?` to a syntactically-correct PostgreSQL query.
| SELECT T2.Name , T1.Team FROM elimination AS T1 JOIN wrestler AS T2 ON T1.Wrestler_ID = T2.Wrestler_ID ORDER BY T2.Days_held DESC |
List the time of elimination of the wrestlers with largest days held. |
-- Language PostgreSQL
-- Tables:
-- Table: wrestler
columns : [['wrestler id', 'number'], ['name', 'text'], ['reign', 'text'], ['days held', 'text'], ['location', 'text'], ['event', 'text']]
-- Table: elimination
columns : [['elimination id', 'text'], ['wrestler id', 'text'], ['team', 'text'], ['eliminated by', 'text'], ['elimination move', 'text'], ['time', 'text']]
You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL.
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.
Translate `List the time of elimination of the wrestlers with largest days held.` to a syntactically-correct PostgreSQL query.
| SELECT T1.Time FROM elimination AS T1 JOIN wrestler AS T2 ON T1.Wrestler_ID = T2.Wrestler_ID ORDER BY T2.Days_held DESC LIMIT 1 |
What is the time of elimination for the wrestler with the most days held? |
-- Language PostgreSQL
-- Tables:
-- Table: wrestler
columns : [['wrestler id', 'number'], ['name', 'text'], ['reign', 'text'], ['days held', 'text'], ['location', 'text'], ['event', 'text']]
-- Table: elimination
columns : [['elimination id', 'text'], ['wrestler id', 'text'], ['team', 'text'], ['eliminated by', 'text'], ['elimination move', 'text'], ['time', 'text']]
You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL.
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.
Translate `What is the time of elimination for the wrestler with the most days held?` to a syntactically-correct PostgreSQL query.
| SELECT T1.Time FROM elimination AS T1 JOIN wrestler AS T2 ON T1.Wrestler_ID = T2.Wrestler_ID ORDER BY T2.Days_held DESC LIMIT 1 |
Show times of elimination of wrestlers with days held more than 50. |
-- Language PostgreSQL
-- Tables:
-- Table: wrestler
columns : [['wrestler id', 'number'], ['name', 'text'], ['reign', 'text'], ['days held', 'text'], ['location', 'text'], ['event', 'text']]
-- Table: elimination
columns : [['elimination id', 'text'], ['wrestler id', 'text'], ['team', 'text'], ['eliminated by', 'text'], ['elimination move', 'text'], ['time', 'text']]
You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL.
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.
Translate `Show times of elimination of wrestlers with days held more than 50.` to a syntactically-correct PostgreSQL query.
| SELECT T1.Time FROM elimination AS T1 JOIN wrestler AS T2 ON T1.Wrestler_ID = T2.Wrestler_ID WHERE T2.Days_held > 50 |
What are the times of elimination for wrestlers with over 50 days held? |
-- Language PostgreSQL
-- Tables:
-- Table: wrestler
columns : [['wrestler id', 'number'], ['name', 'text'], ['reign', 'text'], ['days held', 'text'], ['location', 'text'], ['event', 'text']]
-- Table: elimination
columns : [['elimination id', 'text'], ['wrestler id', 'text'], ['team', 'text'], ['eliminated by', 'text'], ['elimination move', 'text'], ['time', 'text']]
You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL.
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.
Translate `What are the times of elimination for wrestlers with over 50 days held?` to a syntactically-correct PostgreSQL query.
| SELECT T1.Time FROM elimination AS T1 JOIN wrestler AS T2 ON T1.Wrestler_ID = T2.Wrestler_ID WHERE T2.Days_held > 50 |
Show different teams in eliminations and the number of eliminations from each team. |
-- Language PostgreSQL
-- Tables:
-- Table: wrestler
columns : [['wrestler id', 'number'], ['name', 'text'], ['reign', 'text'], ['days held', 'text'], ['location', 'text'], ['event', 'text']]
-- Table: elimination
columns : [['elimination id', 'text'], ['wrestler id', 'text'], ['team', 'text'], ['eliminated by', 'text'], ['elimination move', 'text'], ['time', 'text']]
You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL.
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.
Translate `Show different teams in eliminations and the number of eliminations from each team.` to a syntactically-correct PostgreSQL query.
| SELECT Team , COUNT(*) FROM elimination GROUP BY Team |
How many eliminations did each team have? |
-- Language PostgreSQL
-- Tables:
-- Table: wrestler
columns : [['wrestler id', 'number'], ['name', 'text'], ['reign', 'text'], ['days held', 'text'], ['location', 'text'], ['event', 'text']]
-- Table: elimination
columns : [['elimination id', 'text'], ['wrestler id', 'text'], ['team', 'text'], ['eliminated by', 'text'], ['elimination move', 'text'], ['time', 'text']]
You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL.
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.
Translate `How many eliminations did each team have?` to a syntactically-correct PostgreSQL query.
| SELECT Team , COUNT(*) FROM elimination GROUP BY Team |
Show teams that have suffered more than three eliminations. |
-- Language PostgreSQL
-- Tables:
-- Table: wrestler
columns : [['wrestler id', 'number'], ['name', 'text'], ['reign', 'text'], ['days held', 'text'], ['location', 'text'], ['event', 'text']]
-- Table: elimination
columns : [['elimination id', 'text'], ['wrestler id', 'text'], ['team', 'text'], ['eliminated by', 'text'], ['elimination move', 'text'], ['time', 'text']]
You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL.
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.
Translate `Show teams that have suffered more than three eliminations.` to a syntactically-correct PostgreSQL query.
| SELECT Team FROM elimination GROUP BY Team HAVING COUNT(*) > 3 |
Which teams had more than 3 eliminations? |
-- Language PostgreSQL
-- Tables:
-- Table: wrestler
columns : [['wrestler id', 'number'], ['name', 'text'], ['reign', 'text'], ['days held', 'text'], ['location', 'text'], ['event', 'text']]
-- Table: elimination
columns : [['elimination id', 'text'], ['wrestler id', 'text'], ['team', 'text'], ['eliminated by', 'text'], ['elimination move', 'text'], ['time', 'text']]
You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL.
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.
Translate `Which teams had more than 3 eliminations?` to a syntactically-correct PostgreSQL query.
| SELECT Team FROM elimination GROUP BY Team HAVING COUNT(*) > 3 |
Show the reign and days held of wrestlers. |
-- Language PostgreSQL
-- Tables:
-- Table: wrestler
columns : [['wrestler id', 'number'], ['name', 'text'], ['reign', 'text'], ['days held', 'text'], ['location', 'text'], ['event', 'text']]
-- Table: elimination
columns : [['elimination id', 'text'], ['wrestler id', 'text'], ['team', 'text'], ['eliminated by', 'text'], ['elimination move', 'text'], ['time', 'text']]
You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL.
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.
Translate `Show the reign and days held of wrestlers.` to a syntactically-correct PostgreSQL query.
| SELECT Reign , Days_held FROM wrestler |
What are the reigns and days held of all wrestlers? |
-- Language PostgreSQL
-- Tables:
-- Table: wrestler
columns : [['wrestler id', 'number'], ['name', 'text'], ['reign', 'text'], ['days held', 'text'], ['location', 'text'], ['event', 'text']]
-- Table: elimination
columns : [['elimination id', 'text'], ['wrestler id', 'text'], ['team', 'text'], ['eliminated by', 'text'], ['elimination move', 'text'], ['time', 'text']]
You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL.
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.
Translate `What are the reigns and days held of all wrestlers?` to a syntactically-correct PostgreSQL query.
| SELECT Reign , Days_held FROM wrestler |
What are the names of wrestlers days held less than 100? |
-- Language PostgreSQL
-- Tables:
-- Table: wrestler
columns : [['wrestler id', 'number'], ['name', 'text'], ['reign', 'text'], ['days held', 'text'], ['location', 'text'], ['event', 'text']]
-- Table: elimination
columns : [['elimination id', 'text'], ['wrestler id', 'text'], ['team', 'text'], ['eliminated by', 'text'], ['elimination move', 'text'], ['time', 'text']]
You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL.
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.
Translate `What are the names of wrestlers days held less than 100?` to a syntactically-correct PostgreSQL query.
| SELECT Name FROM wrestler WHERE Days_held < 100 |
Return the names of wrestlers with fewer than 100 days held. |
-- Language PostgreSQL
-- Tables:
-- Table: wrestler
columns : [['wrestler id', 'number'], ['name', 'text'], ['reign', 'text'], ['days held', 'text'], ['location', 'text'], ['event', 'text']]
-- Table: elimination
columns : [['elimination id', 'text'], ['wrestler id', 'text'], ['team', 'text'], ['eliminated by', 'text'], ['elimination move', 'text'], ['time', 'text']]
You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL.
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.
Translate `Return the names of wrestlers with fewer than 100 days held.` to a syntactically-correct PostgreSQL query.
| SELECT Name FROM wrestler WHERE Days_held < 100 |
Please show the most common reigns of wrestlers. |
-- Language PostgreSQL
-- Tables:
-- Table: wrestler
columns : [['wrestler id', 'number'], ['name', 'text'], ['reign', 'text'], ['days held', 'text'], ['location', 'text'], ['event', 'text']]
-- Table: elimination
columns : [['elimination id', 'text'], ['wrestler id', 'text'], ['team', 'text'], ['eliminated by', 'text'], ['elimination move', 'text'], ['time', 'text']]
You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL.
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.
Translate `Please show the most common reigns of wrestlers.` to a syntactically-correct PostgreSQL query.
| SELECT Reign FROM wrestler GROUP BY Reign ORDER BY COUNT(*) DESC LIMIT 1 |
Which reign is the most common among wrestlers? |
-- Language PostgreSQL
-- Tables:
-- Table: wrestler
columns : [['wrestler id', 'number'], ['name', 'text'], ['reign', 'text'], ['days held', 'text'], ['location', 'text'], ['event', 'text']]
-- Table: elimination
columns : [['elimination id', 'text'], ['wrestler id', 'text'], ['team', 'text'], ['eliminated by', 'text'], ['elimination move', 'text'], ['time', 'text']]
You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL.
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.
Translate `Which reign is the most common among wrestlers?` to a syntactically-correct PostgreSQL query.
| SELECT Reign FROM wrestler GROUP BY Reign ORDER BY COUNT(*) DESC LIMIT 1 |
List the locations that are shared by more than two wrestlers. |
-- Language PostgreSQL
-- Tables:
-- Table: wrestler
columns : [['wrestler id', 'number'], ['name', 'text'], ['reign', 'text'], ['days held', 'text'], ['location', 'text'], ['event', 'text']]
-- Table: elimination
columns : [['elimination id', 'text'], ['wrestler id', 'text'], ['team', 'text'], ['eliminated by', 'text'], ['elimination move', 'text'], ['time', 'text']]
You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL.
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.
Translate `List the locations that are shared by more than two wrestlers.` to a syntactically-correct PostgreSQL query.
| SELECT LOCATION FROM wrestler GROUP BY LOCATION HAVING COUNT(*) > 2 |
Which locations are shared by more than two wrestlers? |
-- Language PostgreSQL
-- Tables:
-- Table: wrestler
columns : [['wrestler id', 'number'], ['name', 'text'], ['reign', 'text'], ['days held', 'text'], ['location', 'text'], ['event', 'text']]
-- Table: elimination
columns : [['elimination id', 'text'], ['wrestler id', 'text'], ['team', 'text'], ['eliminated by', 'text'], ['elimination move', 'text'], ['time', 'text']]
You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL.
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.
Translate `Which locations are shared by more than two wrestlers?` to a syntactically-correct PostgreSQL query.
| SELECT LOCATION FROM wrestler GROUP BY LOCATION HAVING COUNT(*) > 2 |
List the names of wrestlers that have not been eliminated. |
-- Language PostgreSQL
-- Tables:
-- Table: wrestler
columns : [['wrestler id', 'number'], ['name', 'text'], ['reign', 'text'], ['days held', 'text'], ['location', 'text'], ['event', 'text']]
-- Table: elimination
columns : [['elimination id', 'text'], ['wrestler id', 'text'], ['team', 'text'], ['eliminated by', 'text'], ['elimination move', 'text'], ['time', 'text']]
You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL.
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.
Translate `List the names of wrestlers that have not been eliminated.` to a syntactically-correct PostgreSQL query.
| SELECT Name FROM wrestler WHERE Wrestler_ID NOT IN (SELECT Wrestler_ID FROM elimination) |
What are the names of wrestlers who have never been eliminated? |
-- Language PostgreSQL
-- Tables:
-- Table: wrestler
columns : [['wrestler id', 'number'], ['name', 'text'], ['reign', 'text'], ['days held', 'text'], ['location', 'text'], ['event', 'text']]
-- Table: elimination
columns : [['elimination id', 'text'], ['wrestler id', 'text'], ['team', 'text'], ['eliminated by', 'text'], ['elimination move', 'text'], ['time', 'text']]
You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL.
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.
Translate `What are the names of wrestlers who have never been eliminated?` to a syntactically-correct PostgreSQL query.
| SELECT Name FROM wrestler WHERE Wrestler_ID NOT IN (SELECT Wrestler_ID FROM elimination) |
Show the teams that have both wrestlers eliminated by "Orton" and wrestlers eliminated by "Benjamin". |
-- Language PostgreSQL
-- Tables:
-- Table: wrestler
columns : [['wrestler id', 'number'], ['name', 'text'], ['reign', 'text'], ['days held', 'text'], ['location', 'text'], ['event', 'text']]
-- Table: elimination
columns : [['elimination id', 'text'], ['wrestler id', 'text'], ['team', 'text'], ['eliminated by', 'text'], ['elimination move', 'text'], ['time', 'text']]
You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL.
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.
Translate `Show the teams that have both wrestlers eliminated by "Orton" and wrestlers eliminated by "Benjamin".` to a syntactically-correct PostgreSQL query.
| SELECT Team FROM Elimination WHERE Eliminated_By = "Orton" INTERSECT SELECT Team FROM Elimination WHERE Eliminated_By = "Benjamin" |
What are the teams that have both wrestlers eliminated by Orton and wrestlers eliminated by Benjamin? |
-- Language PostgreSQL
-- Tables:
-- Table: wrestler
columns : [['wrestler id', 'number'], ['name', 'text'], ['reign', 'text'], ['days held', 'text'], ['location', 'text'], ['event', 'text']]
-- Table: elimination
columns : [['elimination id', 'text'], ['wrestler id', 'text'], ['team', 'text'], ['eliminated by', 'text'], ['elimination move', 'text'], ['time', 'text']]
You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL.
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.
Translate `What are the teams that have both wrestlers eliminated by Orton and wrestlers eliminated by Benjamin?` to a syntactically-correct PostgreSQL query.
| SELECT Team FROM Elimination WHERE Eliminated_By = "Orton" INTERSECT SELECT Team FROM Elimination WHERE Eliminated_By = "Benjamin" |
What is the number of distinct teams that suffer elimination? |
-- Language PostgreSQL
-- Tables:
-- Table: wrestler
columns : [['wrestler id', 'number'], ['name', 'text'], ['reign', 'text'], ['days held', 'text'], ['location', 'text'], ['event', 'text']]
-- Table: elimination
columns : [['elimination id', 'text'], ['wrestler id', 'text'], ['team', 'text'], ['eliminated by', 'text'], ['elimination move', 'text'], ['time', 'text']]
You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL.
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.
Translate `What is the number of distinct teams that suffer elimination?` to a syntactically-correct PostgreSQL query.
| SELECT COUNT (DISTINCT team) FROM elimination |
How many different teams have had eliminated wrestlers? |
-- Language PostgreSQL
-- Tables:
-- Table: wrestler
columns : [['wrestler id', 'number'], ['name', 'text'], ['reign', 'text'], ['days held', 'text'], ['location', 'text'], ['event', 'text']]
-- Table: elimination
columns : [['elimination id', 'text'], ['wrestler id', 'text'], ['team', 'text'], ['eliminated by', 'text'], ['elimination move', 'text'], ['time', 'text']]
You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL.
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.
Translate `How many different teams have had eliminated wrestlers?` to a syntactically-correct PostgreSQL query.
| SELECT COUNT (DISTINCT team) FROM elimination |
Show the times of elimination by "Punk" or "Orton". |
-- Language PostgreSQL
-- Tables:
-- Table: wrestler
columns : [['wrestler id', 'number'], ['name', 'text'], ['reign', 'text'], ['days held', 'text'], ['location', 'text'], ['event', 'text']]
-- Table: elimination
columns : [['elimination id', 'text'], ['wrestler id', 'text'], ['team', 'text'], ['eliminated by', 'text'], ['elimination move', 'text'], ['time', 'text']]
You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL.
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.
Translate `Show the times of elimination by "Punk" or "Orton".` to a syntactically-correct PostgreSQL query.
| SELECT TIME FROM elimination WHERE Eliminated_By = "Punk" OR Eliminated_By = "Orton" |
What are the times of elimination for any instances in which the elimination was done by Punk or Orton? |
-- Language PostgreSQL
-- Tables:
-- Table: wrestler
columns : [['wrestler id', 'number'], ['name', 'text'], ['reign', 'text'], ['days held', 'text'], ['location', 'text'], ['event', 'text']]
-- Table: elimination
columns : [['elimination id', 'text'], ['wrestler id', 'text'], ['team', 'text'], ['eliminated by', 'text'], ['elimination move', 'text'], ['time', 'text']]
You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL.
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.
Translate `What are the times of elimination for any instances in which the elimination was done by Punk or Orton?` to a syntactically-correct PostgreSQL query.
| SELECT TIME FROM elimination WHERE Eliminated_By = "Punk" OR Eliminated_By = "Orton" |
How many schools are there? |
-- Language PostgreSQL
-- Tables:
-- Table: school
columns : [['school id', 'text'], ['school name', 'text'], ['location', 'text'], ['mascot', 'text'], ['enrollment', 'number'], ['ihsaa class', 'text'], ['ihsaa football class', 'text'], ['county', 'text']]
-- Table: budget
columns : [['school id', 'number'], ['year', 'number'], ['budgeted', 'number'], ['total budget percent budgeted', 'number'], ['invested', 'number'], ['total budget percent invested', 'number'], ['budget invested percent', 'text']]
-- Table: endowment
columns : [['endowment id', 'number'], ['school id', 'number'], ['donator name', 'text'], ['amount', 'number']]
You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL.
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.
Translate `How many schools are there?` to a syntactically-correct PostgreSQL query.
| SELECT count(*) FROM school |
Count the number of schools. |
-- Language PostgreSQL
-- Tables:
-- Table: school
columns : [['school id', 'text'], ['school name', 'text'], ['location', 'text'], ['mascot', 'text'], ['enrollment', 'number'], ['ihsaa class', 'text'], ['ihsaa football class', 'text'], ['county', 'text']]
-- Table: budget
columns : [['school id', 'number'], ['year', 'number'], ['budgeted', 'number'], ['total budget percent budgeted', 'number'], ['invested', 'number'], ['total budget percent invested', 'number'], ['budget invested percent', 'text']]
-- Table: endowment
columns : [['endowment id', 'number'], ['school id', 'number'], ['donator name', 'text'], ['amount', 'number']]
You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL.
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.
Translate `Count the number of schools.` to a syntactically-correct PostgreSQL query.
| SELECT count(*) FROM school |
Show all school names in alphabetical order. |
-- Language PostgreSQL
-- Tables:
-- Table: school
columns : [['school id', 'text'], ['school name', 'text'], ['location', 'text'], ['mascot', 'text'], ['enrollment', 'number'], ['ihsaa class', 'text'], ['ihsaa football class', 'text'], ['county', 'text']]
-- Table: budget
columns : [['school id', 'number'], ['year', 'number'], ['budgeted', 'number'], ['total budget percent budgeted', 'number'], ['invested', 'number'], ['total budget percent invested', 'number'], ['budget invested percent', 'text']]
-- Table: endowment
columns : [['endowment id', 'number'], ['school id', 'number'], ['donator name', 'text'], ['amount', 'number']]
You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL.
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.
Translate `Show all school names in alphabetical order.` to a syntactically-correct PostgreSQL query.
| SELECT school_name FROM school ORDER BY school_name |
List the name, location, mascot for all schools. |
-- Language PostgreSQL
-- Tables:
-- Table: school
columns : [['school id', 'text'], ['school name', 'text'], ['location', 'text'], ['mascot', 'text'], ['enrollment', 'number'], ['ihsaa class', 'text'], ['ihsaa football class', 'text'], ['county', 'text']]
-- Table: budget
columns : [['school id', 'number'], ['year', 'number'], ['budgeted', 'number'], ['total budget percent budgeted', 'number'], ['invested', 'number'], ['total budget percent invested', 'number'], ['budget invested percent', 'text']]
-- Table: endowment
columns : [['endowment id', 'number'], ['school id', 'number'], ['donator name', 'text'], ['amount', 'number']]
You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL.
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.
Translate `List the name, location, mascot for all schools.` to a syntactically-correct PostgreSQL query.
| SELECT school_name , LOCATION , mascot FROM school |
What are the total and average enrollment of all schools? |
-- Language PostgreSQL
-- Tables:
-- Table: school
columns : [['school id', 'text'], ['school name', 'text'], ['location', 'text'], ['mascot', 'text'], ['enrollment', 'number'], ['ihsaa class', 'text'], ['ihsaa football class', 'text'], ['county', 'text']]
-- Table: budget
columns : [['school id', 'number'], ['year', 'number'], ['budgeted', 'number'], ['total budget percent budgeted', 'number'], ['invested', 'number'], ['total budget percent invested', 'number'], ['budget invested percent', 'text']]
-- Table: endowment
columns : [['endowment id', 'number'], ['school id', 'number'], ['donator name', 'text'], ['amount', 'number']]
You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL.
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.
Translate `What are the total and average enrollment of all schools?` to a syntactically-correct PostgreSQL query.
| SELECT sum(enrollment) , avg(enrollment) FROM school |
What are the mascots for schools with enrollments above the average? |
-- Language PostgreSQL
-- Tables:
-- Table: school
columns : [['school id', 'text'], ['school name', 'text'], ['location', 'text'], ['mascot', 'text'], ['enrollment', 'number'], ['ihsaa class', 'text'], ['ihsaa football class', 'text'], ['county', 'text']]
-- Table: budget
columns : [['school id', 'number'], ['year', 'number'], ['budgeted', 'number'], ['total budget percent budgeted', 'number'], ['invested', 'number'], ['total budget percent invested', 'number'], ['budget invested percent', 'text']]
-- Table: endowment
columns : [['endowment id', 'number'], ['school id', 'number'], ['donator name', 'text'], ['amount', 'number']]
You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL.
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.
Translate `What are the mascots for schools with enrollments above the average?` to a syntactically-correct PostgreSQL query.
| SELECT mascot FROM school WHERE enrollment > (SELECT avg(enrollment) FROM school) |
List the name of the school with the smallest enrollment. |
-- Language PostgreSQL
-- Tables:
-- Table: school
columns : [['school id', 'text'], ['school name', 'text'], ['location', 'text'], ['mascot', 'text'], ['enrollment', 'number'], ['ihsaa class', 'text'], ['ihsaa football class', 'text'], ['county', 'text']]
-- Table: budget
columns : [['school id', 'number'], ['year', 'number'], ['budgeted', 'number'], ['total budget percent budgeted', 'number'], ['invested', 'number'], ['total budget percent invested', 'number'], ['budget invested percent', 'text']]
-- Table: endowment
columns : [['endowment id', 'number'], ['school id', 'number'], ['donator name', 'text'], ['amount', 'number']]
You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL.
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.
Translate `List the name of the school with the smallest enrollment.` to a syntactically-correct PostgreSQL query.
| SELECT school_name FROM school ORDER BY enrollment LIMIT 1 |
Show the average, maximum, minimum enrollment of all schools. |
-- Language PostgreSQL
-- Tables:
-- Table: school
columns : [['school id', 'text'], ['school name', 'text'], ['location', 'text'], ['mascot', 'text'], ['enrollment', 'number'], ['ihsaa class', 'text'], ['ihsaa football class', 'text'], ['county', 'text']]
-- Table: budget
columns : [['school id', 'number'], ['year', 'number'], ['budgeted', 'number'], ['total budget percent budgeted', 'number'], ['invested', 'number'], ['total budget percent invested', 'number'], ['budget invested percent', 'text']]
-- Table: endowment
columns : [['endowment id', 'number'], ['school id', 'number'], ['donator name', 'text'], ['amount', 'number']]
You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL.
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.
Translate `Show the average, maximum, minimum enrollment of all schools.` to a syntactically-correct PostgreSQL query.
| SELECT avg(enrollment) , max(enrollment) , min(enrollment) FROM school |
Show each county along with the number of schools and total enrollment in each county. |
-- Language PostgreSQL
-- Tables:
-- Table: school
columns : [['school id', 'text'], ['school name', 'text'], ['location', 'text'], ['mascot', 'text'], ['enrollment', 'number'], ['ihsaa class', 'text'], ['ihsaa football class', 'text'], ['county', 'text']]
-- Table: budget
columns : [['school id', 'number'], ['year', 'number'], ['budgeted', 'number'], ['total budget percent budgeted', 'number'], ['invested', 'number'], ['total budget percent invested', 'number'], ['budget invested percent', 'text']]
-- Table: endowment
columns : [['endowment id', 'number'], ['school id', 'number'], ['donator name', 'text'], ['amount', 'number']]
You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL.
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.
Translate `Show each county along with the number of schools and total enrollment in each county.` to a syntactically-correct PostgreSQL query.
| SELECT county , count(*) , sum(enrollment) FROM school GROUP BY county |
How many donors have endowment for school named "Glenn"? |
-- Language PostgreSQL
-- Tables:
-- Table: school
columns : [['school id', 'text'], ['school name', 'text'], ['location', 'text'], ['mascot', 'text'], ['enrollment', 'number'], ['ihsaa class', 'text'], ['ihsaa football class', 'text'], ['county', 'text']]
-- Table: budget
columns : [['school id', 'number'], ['year', 'number'], ['budgeted', 'number'], ['total budget percent budgeted', 'number'], ['invested', 'number'], ['total budget percent invested', 'number'], ['budget invested percent', 'text']]
-- Table: endowment
columns : [['endowment id', 'number'], ['school id', 'number'], ['donator name', 'text'], ['amount', 'number']]
You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL.
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.
Translate `How many donors have endowment for school named "Glenn"?` to a syntactically-correct PostgreSQL query.
| SELECT count(DISTINCT T1.donator_name) FROM endowment AS T1 JOIN school AS T2 ON T1.school_id = T2.school_id WHERE T2.school_name = "Glenn" |
List each donator name and the amount of endowment in descending order of the amount of endowment. |
-- Language PostgreSQL
-- Tables:
-- Table: school
columns : [['school id', 'text'], ['school name', 'text'], ['location', 'text'], ['mascot', 'text'], ['enrollment', 'number'], ['ihsaa class', 'text'], ['ihsaa football class', 'text'], ['county', 'text']]
-- Table: budget
columns : [['school id', 'number'], ['year', 'number'], ['budgeted', 'number'], ['total budget percent budgeted', 'number'], ['invested', 'number'], ['total budget percent invested', 'number'], ['budget invested percent', 'text']]
-- Table: endowment
columns : [['endowment id', 'number'], ['school id', 'number'], ['donator name', 'text'], ['amount', 'number']]
You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL.
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.
Translate `List each donator name and the amount of endowment in descending order of the amount of endowment.` to a syntactically-correct PostgreSQL query.
| SELECT donator_name , sum(amount) FROM endowment GROUP BY donator_name ORDER BY sum(amount) DESC |
List the names of the schools without any endowment. |
-- Language PostgreSQL
-- Tables:
-- Table: school
columns : [['school id', 'text'], ['school name', 'text'], ['location', 'text'], ['mascot', 'text'], ['enrollment', 'number'], ['ihsaa class', 'text'], ['ihsaa football class', 'text'], ['county', 'text']]
-- Table: budget
columns : [['school id', 'number'], ['year', 'number'], ['budgeted', 'number'], ['total budget percent budgeted', 'number'], ['invested', 'number'], ['total budget percent invested', 'number'], ['budget invested percent', 'text']]
-- Table: endowment
columns : [['endowment id', 'number'], ['school id', 'number'], ['donator name', 'text'], ['amount', 'number']]
You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL.
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.
Translate `List the names of the schools without any endowment.` to a syntactically-correct PostgreSQL query.
| SELECT school_name FROM school WHERE school_id NOT IN (SELECT school_id FROM endowment) |
List all the names of schools with an endowment amount smaller than or equal to 10. |
-- Language PostgreSQL
-- Tables:
-- Table: school
columns : [['school id', 'text'], ['school name', 'text'], ['location', 'text'], ['mascot', 'text'], ['enrollment', 'number'], ['ihsaa class', 'text'], ['ihsaa football class', 'text'], ['county', 'text']]
-- Table: budget
columns : [['school id', 'number'], ['year', 'number'], ['budgeted', 'number'], ['total budget percent budgeted', 'number'], ['invested', 'number'], ['total budget percent invested', 'number'], ['budget invested percent', 'text']]
-- Table: endowment
columns : [['endowment id', 'number'], ['school id', 'number'], ['donator name', 'text'], ['amount', 'number']]
You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL.
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.
Translate `List all the names of schools with an endowment amount smaller than or equal to 10.` to a syntactically-correct PostgreSQL query.
| SELECT T2.school_name FROM endowment AS T1 JOIN school AS T2 ON T1.school_id = T2.school_id GROUP BY T1.school_id HAVING sum(T1.amount) <= 10 |
Show the names of donors who donated to both school "Glenn" and "Triton." |
-- Language PostgreSQL
-- Tables:
-- Table: school
columns : [['school id', 'text'], ['school name', 'text'], ['location', 'text'], ['mascot', 'text'], ['enrollment', 'number'], ['ihsaa class', 'text'], ['ihsaa football class', 'text'], ['county', 'text']]
-- Table: budget
columns : [['school id', 'number'], ['year', 'number'], ['budgeted', 'number'], ['total budget percent budgeted', 'number'], ['invested', 'number'], ['total budget percent invested', 'number'], ['budget invested percent', 'text']]
-- Table: endowment
columns : [['endowment id', 'number'], ['school id', 'number'], ['donator name', 'text'], ['amount', 'number']]
You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL.
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.
Translate `Show the names of donors who donated to both school "Glenn" and "Triton."` to a syntactically-correct PostgreSQL query.
| SELECT T1.donator_name FROM endowment AS T1 JOIN school AS T2 ON T1.school_id = T2.school_id WHERE T2.school_name = 'Glenn' INTERSECT SELECT T1.donator_name FROM endowment AS T1 JOIN school AS T2 ON T1.school_id = T2.school_id WHERE T2.school_name = 'Triton' |
Show the names of all the donors except those whose donation amount less than 9. |
-- Language PostgreSQL
-- Tables:
-- Table: school
columns : [['school id', 'text'], ['school name', 'text'], ['location', 'text'], ['mascot', 'text'], ['enrollment', 'number'], ['ihsaa class', 'text'], ['ihsaa football class', 'text'], ['county', 'text']]
-- Table: budget
columns : [['school id', 'number'], ['year', 'number'], ['budgeted', 'number'], ['total budget percent budgeted', 'number'], ['invested', 'number'], ['total budget percent invested', 'number'], ['budget invested percent', 'text']]
-- Table: endowment
columns : [['endowment id', 'number'], ['school id', 'number'], ['donator name', 'text'], ['amount', 'number']]
You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL.
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.
Translate `Show the names of all the donors except those whose donation amount less than 9.` to a syntactically-correct PostgreSQL query.
| SELECT donator_name FROM endowment EXCEPT SELECT donator_name FROM endowment WHERE amount < 9 |
List the amount and donor name for the largest amount of donation. |
-- Language PostgreSQL
-- Tables:
-- Table: school
columns : [['school id', 'text'], ['school name', 'text'], ['location', 'text'], ['mascot', 'text'], ['enrollment', 'number'], ['ihsaa class', 'text'], ['ihsaa football class', 'text'], ['county', 'text']]
-- Table: budget
columns : [['school id', 'number'], ['year', 'number'], ['budgeted', 'number'], ['total budget percent budgeted', 'number'], ['invested', 'number'], ['total budget percent invested', 'number'], ['budget invested percent', 'text']]
-- Table: endowment
columns : [['endowment id', 'number'], ['school id', 'number'], ['donator name', 'text'], ['amount', 'number']]
You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL.
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.
Translate `List the amount and donor name for the largest amount of donation.` to a syntactically-correct PostgreSQL query.
| SELECT amount , donator_name FROM endowment ORDER BY amount DESC LIMIT 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.