SpiderQuestion stringlengths 16 224 | query stringlengths 18 577 | SpiderSynQuestion stringlengths 19 222 | db_id stringlengths 4 31 |
|---|---|---|---|
What are the names and headquarters of all companies ordered by descending market value? | SELECT company , headquarters FROM company ORDER BY market_value DESC | What are the names and head office of all enterprise ordered by descending market value? | gas_company |
Show minimum, maximum, and average market value for all companies. | SELECT min(market_value) , max(market_value) , avg(market_value) FROM company | Show minimum, maximum, and average market value for all enterprise. | gas_company |
What is the minimum, maximum, and average market value for every company? | SELECT min(market_value) , max(market_value) , avg(market_value) FROM company | What is the minimum, maximum, and average market value for every enterprise? | gas_company |
Show all main industry for all companies. | SELECT DISTINCT main_industry FROM company | Show all main industry for all enterprise. | gas_company |
What are the different main industries for all companies? | SELECT DISTINCT main_industry FROM company | What are the different main industries for all enterprise? | gas_company |
List all headquarters and the number of companies in each headquarter. | SELECT headquarters , count(*) FROM company GROUP BY headquarters | List all head office and the number of companies in each head office. | gas_company |
For each headquarter, what are the headquarter and how many companies are centered there? | SELECT headquarters , count(*) FROM company GROUP BY headquarters | For each head office, what are the head office and how many companies are centered there? | gas_company |
Show all main industry and total market value in each industry. | SELECT main_industry , sum(market_value) FROM company GROUP BY main_industry | Show all main industry and total market value in each industry. | gas_company |
What are the main indstries and total market value for each industry? | SELECT main_industry , sum(market_value) FROM company GROUP BY main_industry | What are the main indstries and total market value for each industry? | gas_company |
List the main industry with highest total market value and its number of companies. | SELECT main_industry , count(*) FROM company GROUP BY main_industry ORDER BY sum(market_value) DESC LIMIT 1 | List the main industry with highest total market value and its number of enterprise. | gas_company |
For each main industry, what is the total number of companies for the industry with the highest total market value? | SELECT main_industry , count(*) FROM company GROUP BY main_industry ORDER BY sum(market_value) DESC LIMIT 1 | For each main industry, what is the total number of enterprise for the industry with the highest total market value? | gas_company |
Show headquarters with at least two companies in the banking industry. | SELECT headquarters FROM company WHERE main_industry = 'Banking' GROUP BY headquarters HAVING count(*) >= 2 | Show head office with at least two companies in the banking industry. | gas_company |
What are the headquarters with at least two companies in the banking industry? | SELECT headquarters FROM company WHERE main_industry = 'Banking' GROUP BY headquarters HAVING count(*) >= 2 | What are the head office with at least two companies in the banking industry? | gas_company |
Show gas station id, location, and manager_name for all gas stations ordered by open year. | SELECT station_id , LOCATION , manager_name FROM gas_station ORDER BY open_year | Show gas station id, address, and head name for all gas stations ordered by open year. | gas_company |
What are the gas station ids, locations, and manager names for the gas stations ordered by opening year? | SELECT station_id , LOCATION , manager_name FROM gas_station ORDER BY open_year | What are the gas station ids, addresses, and head names for the gas stations ordered by opening year? | gas_company |
How many gas station are opened between 2000 and 2005? | SELECT count(*) FROM gas_station WHERE open_year BETWEEN 2000 AND 2005 | How many gas station are opened between 2000 and 2005? | gas_company |
What is the total number of gas stations that opened between 2000 and 2005? | SELECT count(*) FROM gas_station WHERE open_year BETWEEN 2000 AND 2005 | What is the total number of gas stations that opened between 2000 and 2005? | gas_company |
Show all locations and the number of gas stations in each location ordered by the count. | SELECT LOCATION , count(*) FROM gas_station GROUP BY LOCATION ORDER BY count(*) | Show all addresses and the number of gas stations in each address ordered by the count. | gas_company |
For each location, how many gas stations are there in order? | SELECT LOCATION , count(*) FROM gas_station GROUP BY LOCATION ORDER BY count(*) | For each address, how many gas stations are there in order? | gas_company |
Show all headquarters with both a company in banking industry and a company in Oil and gas. | SELECT headquarters FROM company WHERE main_industry = 'Banking' INTERSECT SELECT headquarters FROM company WHERE main_industry = 'Oil and gas' | Show all head office with both a company in banking industry and a company in Oil and gas. | gas_company |
What are the headquarters that have both a company in the banking and 'oil and gas' industries? | SELECT headquarters FROM company WHERE main_industry = 'Banking' INTERSECT SELECT headquarters FROM company WHERE main_industry = 'Oil and gas' | What are the head office that have both a company in the banking and 'oil and gas' industries? | gas_company |
Show all headquarters without a company in banking industry. | SELECT headquarters FROM company EXCEPT SELECT headquarters FROM company WHERE main_industry = 'Banking' | Show all head office without a company in banking industry. | gas_company |
What are the headquarters without companies that are in the banking industry? | SELECT headquarters FROM company EXCEPT SELECT headquarters FROM company WHERE main_industry = 'Banking' | What are the head office without companies that are in the banking industry? | gas_company |
Show the company name with the number of gas station. | SELECT T2.company , count(*) FROM station_company AS T1 JOIN company AS T2 ON T1.company_id = T2.company_id GROUP BY T1.company_id | Show the enterprise name with the number of gas station. | gas_company |
For each company id, what are the companies and how many gas stations does each one operate? | SELECT T2.company , count(*) FROM station_company AS T1 JOIN company AS T2 ON T1.company_id = T2.company_id GROUP BY T1.company_id | For each enterprise id, what are the enterprise and how many gas stations does each one operate? | gas_company |
Show company name and main industry without a gas station. | SELECT company , main_industry FROM company WHERE company_id NOT IN (SELECT company_id FROM station_company) | Show enterprise name and main industry without a gas station. | gas_company |
What are the main industries of the companies without gas stations and what are the companies? | SELECT company , main_industry FROM company WHERE company_id NOT IN (SELECT company_id FROM station_company) | What are the main industries of the enterprise without gas stations and what are the enterprise? | gas_company |
Show the manager name for gas stations belonging to the ExxonMobil company. | SELECT T3.manager_name FROM station_company AS T1 JOIN company AS T2 ON T1.company_id = T2.company_id JOIN gas_station AS T3 ON T1.station_id = T3.station_id WHERE T2.company = 'ExxonMobil' | Show the head name for gas stations belonging to the ExxonMobil company. | gas_company |
What are the names of the managers for gas stations that are operated by the ExxonMobil company? | SELECT T3.manager_name FROM station_company AS T1 JOIN company AS T2 ON T1.company_id = T2.company_id JOIN gas_station AS T3 ON T1.station_id = T3.station_id WHERE T2.company = 'ExxonMobil' | What are the names of the heads for gas stations that are operated by the ExxonMobil company? | gas_company |
Show all locations where a gas station for company with market value greater than 100 is located. | SELECT T3.location FROM station_company AS T1 JOIN company AS T2 ON T1.company_id = T2.company_id JOIN gas_station AS T3 ON T1.station_id = T3.station_id WHERE T2.market_value > 100 | Show all addresses where a gas station for company with market value greater than 100 is located. | gas_company |
What are the locations that have gas stations owned by a company with a market value greater than 100? | SELECT T3.location FROM station_company AS T1 JOIN company AS T2 ON T1.company_id = T2.company_id JOIN gas_station AS T3 ON T1.station_id = T3.station_id WHERE T2.market_value > 100 | What are the addresses that have gas stations owned by a company with a market value greater than 100? | gas_company |
Show the manager name with most number of gas stations opened after 2000. | SELECT manager_name FROM gas_station WHERE open_year > 2000 GROUP BY manager_name ORDER BY count(*) DESC LIMIT 1 | Show the head name with most number of gas stations opened after 2000. | gas_company |
What is the name of the manager with the most gas stations that opened after 2000? | SELECT manager_name FROM gas_station WHERE open_year > 2000 GROUP BY manager_name ORDER BY count(*) DESC LIMIT 1 | What is the name of the head with the most gas stations that opened after 2000? | gas_company |
order all gas station locations by the opening year. | SELECT LOCATION FROM gas_station ORDER BY open_year | order all gas station addresses by the opening year. | gas_company |
What are the locations of all the gas stations ordered by opening year? | SELECT LOCATION FROM gas_station ORDER BY open_year | What are the addresses of all the gas stations ordered by opening year? | gas_company |
find the rank, company names, market values of the companies in the banking industry order by their sales and profits in billion. | SELECT rank , company , market_value FROM company WHERE main_industry = 'Banking' ORDER BY sales_billion , profits_billion | find the rank, enterprise names, market values of the enterprises in the banking industry order by their sales and profits in billion. | gas_company |
What is the rank, company, and market value of every comapny in the banking industry ordered by sales and profits? | SELECT rank , company , market_value FROM company WHERE main_industry = 'Banking' ORDER BY sales_billion , profits_billion | What is the rank,enterprise, and market value of every enterprise in the banking industry ordered by sales and profits? | gas_company |
find the location and Representative name of the gas stations owned by the companies with top 3 Asset amounts. | SELECT T3.location , T3.Representative_Name FROM station_company AS T1 JOIN company AS T2 ON T1.company_id = T2.company_id JOIN gas_station AS T3 ON T1.station_id = T3.station_id ORDER BY T2.Assets_billion DESC LIMIT 3 | find the address and Representative name of the gas stations owned by the companies with top 3 Asset amounts. | gas_company |
What are the locations and representatives' names of the gas stations owned by the companies with the 3 largest amounts of assets? | SELECT T3.location , T3.Representative_Name FROM station_company AS T1 JOIN company AS T2 ON T1.company_id = T2.company_id JOIN gas_station AS T3 ON T1.station_id = T3.station_id ORDER BY T2.Assets_billion DESC LIMIT 3 | What are the addresses and representatives' names of the gas stations owned by the companies with the 3 largest amounts of assets? | gas_company |
How many regions do we have? | SELECT count(*) FROM region | How many districts do we have? | party_people |
Count the number of regions. | SELECT count(*) FROM region | Count the number of districts. | party_people |
Show all distinct region names ordered by their labels. | SELECT DISTINCT region_name FROM region ORDER BY Label | Show all different district names ordered by their labels. | party_people |
What are the different region names, ordered by labels? | SELECT DISTINCT region_name FROM region ORDER BY Label | What are the different district names, ordered by labels? | party_people |
How many parties do we have? | SELECT count(DISTINCT party_name) FROM party | How many parties do we have? | party_people |
Count the number of different parties. | SELECT count(DISTINCT party_name) FROM party | Count the number of different parties. | party_people |
Show the ministers and the time they took and left office, listed by the time they left office. | SELECT minister , took_office , left_office FROM party ORDER BY left_office | Show the ministers and the time they took and left office, listed by the time they left office. | party_people |
Who are the ministers, when did they take office, and when did they leave office, ordered by when they left office? | SELECT minister , took_office , left_office FROM party ORDER BY left_office | Who are the ministers, when did they take office, and when did they leave office, ordered by when they left office? | party_people |
Show the minister who took office after 1961 or before 1959. | SELECT minister FROM party WHERE took_office > 1961 OR took_office < 1959 | Show the minister who took office after 1961 or before 1959. | party_people |
Who are the ministers who took office after 1961 or before 1959? | SELECT minister FROM party WHERE took_office > 1961 OR took_office < 1959 | Who are the ministers who took office after 1961 or before 1959? | party_people |
Show all ministers who do not belong to Progress Party. | SELECT minister FROM party WHERE party_name != 'Progress Party' | Show all ministers who do not belong to Progress Party. | party_people |
Which ministers are not a part of the Progress Party? | SELECT minister FROM party WHERE party_name != 'Progress Party' | Which ministers are not a part of the Progress Party? | party_people |
Show all ministers and parties they belong to in descending order of the time they took office. | SELECT minister , party_name FROM party ORDER BY took_office DESC | Show all ministers and parties they belong to in descending order of the time they took office. | party_people |
Who are the ministers and what parties do they belong to, listed descending by the times they took office? | SELECT minister , party_name FROM party ORDER BY took_office DESC | Who are the ministers and what parties do they belong to, listed descending by the times they took office? | party_people |
Return the minister who left office at the latest time. | SELECT minister FROM party ORDER BY left_office DESC LIMIT 1 | Return the minister who left office at the latest time. | party_people |
Which minister left office the latest? | SELECT minister FROM party ORDER BY left_office DESC LIMIT 1 | Which minister left office the latest? | party_people |
List member names and their party names. | SELECT T1.member_name , T2.party_name FROM Member AS T1 JOIN party AS T2 ON T1.party_id = T2.party_id | List member names and their party names. | party_people |
What are the names of members and their corresponding parties? | SELECT T1.member_name , T2.party_name FROM Member AS T1 JOIN party AS T2 ON T1.party_id = T2.party_id | What are the names of members and their corresponding parties? | party_people |
Show all party names and the number of members in each party. | SELECT T2.party_name , count(*) FROM Member AS T1 JOIN party AS T2 ON T1.party_id = T2.party_id GROUP BY T1.party_id | Show all party names and the number of members in each party. | party_people |
How many members are in each party? | SELECT T2.party_name , count(*) FROM Member AS T1 JOIN party AS T2 ON T1.party_id = T2.party_id GROUP BY T1.party_id | How many members are in each party? | party_people |
What is the name of party with most number of members? | SELECT T2.party_name FROM Member AS T1 JOIN party AS T2 ON T1.party_id = T2.party_id GROUP BY T1.party_id ORDER BY count(*) DESC LIMIT 1 | What is the name of party with most number of members? | party_people |
Return the name of the party with the most members. | SELECT T2.party_name FROM Member AS T1 JOIN party AS T2 ON T1.party_id = T2.party_id GROUP BY T1.party_id ORDER BY count(*) DESC LIMIT 1 | Return the name of the party with the most members. | party_people |
Show all party names and their region names. | SELECT T1.party_name , T2.region_name FROM party AS T1 JOIN region AS T2 ON T1.region_id = T2.region_id | Show all party names and their district names. | party_people |
What are the names of parties and their respective regions? | SELECT T1.party_name , T2.region_name FROM party AS T1 JOIN region AS T2 ON T1.region_id = T2.region_id | What are the names of parties and their respective districts? | party_people |
Show names of parties that does not have any members. | SELECT party_name FROM party WHERE party_id NOT IN (SELECT party_id FROM Member) | Show names of parties that does not have any members. | party_people |
What are the names of parties that have no members? | SELECT party_name FROM party WHERE party_id NOT IN (SELECT party_id FROM Member) | What are the names of parties that have no members? | party_people |
Show the member names which are in both the party with id 3 and the party with id 1. | SELECT member_name FROM member WHERE party_id = 3 INTERSECT SELECT member_name FROM member WHERE party_id = 1 | Show the member names which are in both the party with id 3 and the party with id 1. | party_people |
Which member names are shared among members in the party with the id 3 and the party with the id 1? | SELECT member_name FROM member WHERE party_id = 3 INTERSECT SELECT member_name FROM member WHERE party_id = 1 | Which member names are shared among members in the party with the id 3 and the party with the id 1? | party_people |
Show member names that are not in the Progress Party. | SELECT T1.member_name FROM Member AS T1 JOIN party AS T2 ON T1.party_id = T2.party_id WHERE T2.Party_name != "Progress Party" | Show member names that are not in the Progress Party. | party_people |
Which member names corresponding to members who are not in the Progress Party? | SELECT T1.member_name FROM Member AS T1 JOIN party AS T2 ON T1.party_id = T2.party_id WHERE T2.Party_name != "Progress Party" | Which member names corresponding to members who are not in the Progress Party? | party_people |
How many party events do we have? | SELECT count(*) FROM party_events | How many party events do we have? | party_people |
Count the number of party events. | SELECT count(*) FROM party_events | Count the number of party events. | party_people |
Show party names and the number of events for each party. | SELECT T2.party_name , count(*) FROM party_events AS T1 JOIN party AS T2 ON T1.party_id = T2.party_id GROUP BY T1.party_id | Show party names and the number of events for each party. | party_people |
How many events are there for each party? | SELECT T2.party_name , count(*) FROM party_events AS T1 JOIN party AS T2 ON T1.party_id = T2.party_id GROUP BY T1.party_id | How many events are there for each party? | party_people |
Show all member names who are not in charge of any event. | SELECT member_name FROM member EXCEPT SELECT T1.member_name FROM member AS T1 JOIN party_events AS T2 ON T1.member_id = T2.member_in_charge_id | Show all member names who are not in charge of any event. | party_people |
What are the names of members who are not in charge of any events? | SELECT member_name FROM member EXCEPT SELECT T1.member_name FROM member AS T1 JOIN party_events AS T2 ON T1.member_id = T2.member_in_charge_id | What are the names of members who are not in charge of any events? | party_people |
What are the names of parties with at least 2 events? | SELECT T2.party_name FROM party_events AS T1 JOIN party AS T2 ON T1.party_id = T2.party_id GROUP BY T1.party_id HAVING count(*) >= 2 | What are the names of parties with at least 2 events? | party_people |
Return the names of parties that have two or more events. | SELECT T2.party_name FROM party_events AS T1 JOIN party AS T2 ON T1.party_id = T2.party_id GROUP BY T1.party_id HAVING count(*) >= 2 | Return the names of parties that have two or more events. | party_people |
What is the name of member in charge of greatest number of events? | SELECT T1.member_name FROM member AS T1 JOIN party_events AS T2 ON T1.member_id = T2.member_in_charge_id GROUP BY T2.member_in_charge_id ORDER BY count(*) DESC LIMIT 1 | What is the name of member in charge of greatest number of events? | party_people |
Return the name of the member who is in charge of the most events. | SELECT T1.member_name FROM member AS T1 JOIN party_events AS T2 ON T1.member_id = T2.member_in_charge_id GROUP BY T2.member_in_charge_id ORDER BY count(*) DESC LIMIT 1 | Return the name of the member who is in charge of the most events. | party_people |
find the event names that have more than 2 records. | SELECT event_name FROM party_events GROUP BY event_name HAVING count(*) > 2 | find the event names that have more than 2 records. | party_people |
Which event names were used more than twice for party events? | SELECT event_name FROM party_events GROUP BY event_name HAVING count(*) > 2 | Which event names were used more than twice for party events? | party_people |
How many Annual Meeting events happened in the United Kingdom region? | SELECT count(*) FROM region AS t1 JOIN party AS t2 ON t1.region_id = t2.region_id JOIN party_events AS t3 ON t2.party_id = t3.party_id WHERE t1.region_name = "United Kingdom" AND t3.Event_Name = "Annaual Meeting" | How many Annual Meeting events happened in the United Kingdom district? | party_people |
Count the number of Annual Meeting events that took place in the region of the United Kingdom. | SELECT count(*) FROM region AS t1 JOIN party AS t2 ON t1.region_id = t2.region_id JOIN party_events AS t3 ON t2.party_id = t3.party_id WHERE t1.region_name = "United Kingdom" AND t3.Event_Name = "Annaual Meeting" | Count the number of Annual Meeting events that took place in the district of the United Kingdom. | party_people |
How many pilots are there? | SELECT count(*) FROM pilot | How many aviators are there? | pilot_record |
List the names of pilots in ascending order of rank. | SELECT Pilot_name FROM pilot ORDER BY Rank ASC | List the names of aviators in ascending order of rank. | pilot_record |
What are the positions and teams of pilots? | SELECT POSITION , Team FROM pilot | What are the locations and teams of pilots? | pilot_record |
List the distinct positions of pilots older than 30. | SELECT DISTINCT POSITION FROM pilot WHERE Age > 30 | List the different locations of pilots older than 30. | pilot_record |
Show the names of pilots from team "Bradley" or "Fordham". | SELECT Pilot_name FROM pilot WHERE Team = "Bradley" OR Team = "Fordham" | Show the names of aviators from team "Bradley" or "Fordham". | pilot_record |
What is the joined year of the pilot of the highest rank? | SELECT Join_Year FROM pilot ORDER BY Rank ASC LIMIT 1 | What is the joined year of the aviator of the highest rank? | pilot_record |
What are the different nationalities of pilots? Show each nationality and the number of pilots of each nationality. | SELECT Nationality , COUNT(*) FROM pilot GROUP BY Nationality | What are the different countries of pilots? Show each country and the number of pilots of each country. | pilot_record |
Show the most common nationality of pilots. | SELECT Nationality FROM pilot GROUP BY Nationality ORDER BY COUNT(*) DESC LIMIT 1 | Show the most common country of pilots. | pilot_record |
Show the pilot positions that have both pilots joining after year 2005 and pilots joining before 2000. | SELECT POSITION FROM pilot WHERE Join_Year < 2000 INTERSECT SELECT POSITION FROM pilot WHERE Join_Year > 2005 | Show the pilot locations that have both pilots joining after year 2005 and pilots joining before 2000. | pilot_record |
Show the names of pilots and models of aircrafts they have flied with. | SELECT T3.Pilot_name , T2.Model FROM pilot_record AS T1 JOIN aircraft AS T2 ON T1.Aircraft_ID = T2.Aircraft_ID JOIN pilot AS T3 ON T1.Pilot_ID = T3.Pilot_ID | Show the names of aviators and types of aircrafts they have flied with. | pilot_record |
Show the names of pilots and fleet series of the aircrafts they have flied with in ascending order of the rank of the pilot. | SELECT T3.Pilot_name , T2.Fleet_Series FROM pilot_record AS T1 JOIN aircraft AS T2 ON T1.Aircraft_ID = T2.Aircraft_ID JOIN pilot AS T3 ON T1.Pilot_ID = T3.Pilot_ID ORDER BY T3.Rank | Show the names of aviators and fleet series of the aircrafts they have flied with in ascending order of the rank of the aviator. | pilot_record |
Show the fleet series of the aircrafts flied by pilots younger than 34 | SELECT T2.Fleet_Series FROM pilot_record AS T1 JOIN aircraft AS T2 ON T1.Aircraft_ID = T2.Aircraft_ID JOIN pilot AS T3 ON T1.Pilot_ID = T3.Pilot_ID WHERE T3.Age < 34 | Show the fleet series of the aircrafts flied by pilots younger than 34 | pilot_record |
Show the names of pilots and the number of records they have. | SELECT T2.Pilot_name , COUNT(*) FROM pilot_record AS T1 JOIN pilot AS T2 ON T1.pilot_ID = T2.pilot_ID GROUP BY T2.Pilot_name | Show the names of aviators and the number of records they have. | pilot_record |
Show names of pilots that have more than one record. | SELECT T2.Pilot_name , COUNT(*) FROM pilot_record AS T1 JOIN pilot AS T2 ON T1.pilot_ID = T2.pilot_ID GROUP BY T2.Pilot_name HAVING COUNT(*) > 1 | Show names of aviators that have more than one record. | pilot_record |
List the names of pilots that do not have any record. | SELECT Pilot_name FROM pilot WHERE Pilot_ID NOT IN (SELECT Pilot_ID FROM pilot_record) | List the names of aviator that do not have any record. | pilot_record |
What document status codes do we have? | SELECT document_status_code FROM Ref_Document_Status; | What file status codes do we have? | cre_Doc_Control_Systems |
What is the description of document status code 'working'? | SELECT document_status_description FROM Ref_Document_Status WHERE document_status_code = "working"; | What is the describing content of file status code 'working'? | cre_Doc_Control_Systems |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.