minktn/spider-data huggingface dataset:
Database: city_record
Question: Give me a list of cities whose temperature in Mar is lower than that in July and which have also served as host cities?
SQL: SELECT T1.city FROM city AS T1 JOIN temperature AS T2 ON T1.city_id  =  T2.city_id WHERE T2.Mar  <  T2.Jul INTERSECT SELECT T3.city FROM city AS T3 JOIN hosting_city AS T4 ON T3.city_id  =  T4.host_city
Database: city_record
Question: Which cities have lower temperature in March than in July and have been once host cities?
SQL: SELECT T1.city FROM city AS T1 JOIN temperature AS T2 ON T1.city_id  =  T2.city_id WHERE T2.Mar  <  T2.Jul INTERSECT SELECT T3.city FROM city AS T3 JOIN hosting_city AS T4 ON T3.city_id  =  T4.host_city
Database: city_record
Question: Give me a list of cities whose temperature in Mar is lower than that in Dec and which have never been host cities.
SQL: SELECT T1.city FROM city AS T1 JOIN temperature AS T2 ON T1.city_id  =  T2.city_id WHERE T2.Mar  <  T2.Dec EXCEPT SELECT T3.city FROM city AS T3 JOIN hosting_city AS T4 ON T3.city_id  =  T4.host_city
Database: city_record
Question: Which cities have lower temperature in March than in Dec and have never served as host cities?
SQL: SELECT T1.city FROM city AS T1 JOIN temperature AS T2 ON T1.city_id  =  T2.city_id WHERE T2.Mar  <  T2.Dec EXCEPT SELECT T3.city FROM city AS T3 JOIN hosting_city AS T4 ON T3.city_id  =  T4.host_city
Database: city_record
Question: Give me a list of cities whose temperature in Feb is higher than that in Jun or cities that were once host cities?
SQL: SELECT T1.city FROM city AS T1 JOIN temperature AS T2 ON T1.city_id  =  T2.city_id WHERE T2.Feb  >  T2.Jun UNION SELECT T3.city FROM city AS T3 JOIN hosting_city AS T4 ON T3.city_id  =  T4.host_city
Database: city_record
Question: Which cities have higher temperature in Feb than in Jun or have once served as host cities?
SQL: SELECT T1.city FROM city AS T1 JOIN temperature AS T2 ON T1.city_id  =  T2.city_id WHERE T2.Feb  >  T2.Jun UNION SELECT T3.city FROM city AS T3 JOIN hosting_city AS T4 ON T3.city_id  =  T4.host_city
Database: city_record
Question: Please give me a list of cities whose regional population is over 10000000.
SQL: SELECT city FROM city WHERE regional_population  >  10000000
Database: city_record
Question: Which cities have regional population above 10000000?
SQL: SELECT city FROM city WHERE regional_population  >  10000000
Database: city_record
Question: Please give me a list of cities whose regional population is over 8000000 or under 5000000.
SQL: SELECT city FROM city WHERE regional_population  >  10000000 UNION SELECT city FROM city WHERE regional_population  <  5000000
Database: city_record
Question: Which cities have regional population above 8000000 or below 5000000?
SQL: SELECT city FROM city WHERE regional_population  >  10000000 UNION SELECT city FROM city WHERE regional_population  <  5000000
Database: city_record
Question: Find the number of matches in different competitions.
SQL: SELECT count(*) ,  Competition FROM MATCH GROUP BY Competition
Database: city_record
Question: For each competition, count the number of matches.
SQL: SELECT count(*) ,  Competition FROM MATCH GROUP BY Competition
Database: city_record
Question: List venues of all matches in the order of their dates starting from the most recent one.
SQL: SELECT venue FROM MATCH ORDER BY date DESC
Database: city_record
Question: What are the venues of all the matches? Sort them in the descending order of match date.
SQL: SELECT venue FROM MATCH ORDER BY date DESC
Database: city_record
Question: what is the GDP of the city with the largest population.
SQL: SELECT gdp FROM city ORDER BY Regional_Population DESC LIMIT 1
Database: city_record
Question: Find the GDP of the city with the largest regional population.
SQL: SELECT gdp FROM city ORDER BY Regional_Population DESC LIMIT 1
Database: city_record
Question: What are the GDP and population of the city that already served as a host more than once?
SQL: SELECT t1.gdp ,  t1.Regional_Population FROM city AS T1 JOIN hosting_city AS T2 ON T1.city_id  =  T2.host_city GROUP BY t2.Host_City HAVING count(*)  >  1
Database: city_record
Question: Which cities have served as host cities more than once? Return me their GDP and population.
SQL: SELECT t1.gdp ,  t1.Regional_Population FROM city AS T1 JOIN hosting_city AS T2 ON T1.city_id  =  T2.host_city GROUP BY t2.Host_City HAVING count(*)  >  1
Database: e_government
Question: List every individual's first name, middle name and last name in alphabetical order by last name.
SQL: SELECT individual_first_name ,  individual_middle_name ,  individual_last_name FROM individuals ORDER BY individual_last_name
Database: e_government
Question: What are the first, middle, and last names of all individuals, ordered by last name?
SQL: SELECT individual_first_name ,  individual_middle_name ,  individual_last_name FROM individuals ORDER BY individual_last_name
Database: e_government
Question: List all the types of forms.
SQL: SELECT DISTINCT form_type_code FROM forms
Database: e_government
Question: What are the different types of forms?
SQL: SELECT DISTINCT form_type_code FROM forms
Database: e_government
Question: Find the name of the most popular party form.
SQL: SELECT t1.form_name FROM forms AS t1 JOIN party_forms AS t2 ON t1.form_id  =  t2.form_id GROUP BY t2.form_id ORDER BY count(*) DESC LIMIT 1
Database: e_government
Question: What is the name of the party form that is most common?
SQL: SELECT t1.form_name FROM forms AS t1 JOIN party_forms AS t2 ON t1.form_id  =  t2.form_id GROUP BY t2.form_id ORDER BY count(*) DESC LIMIT 1
Database: e_government
Question: Find the payment method and phone of the party with email "enrico09@example.com".
SQL: SELECT payment_method_code ,  party_phone FROM parties WHERE party_email  =  "enrico09@example.com"
Database: e_government
Question: What is the payment method code and party phone of the party with the email 'enrico09@example.com'?
SQL: SELECT payment_method_code ,  party_phone FROM parties WHERE party_email  =  "enrico09@example.com"
Database: e_government
Question: Find the emails of parties with the most popular party form.
SQL: SELECT t1.party_email FROM parties AS t1 JOIN party_forms AS t2 ON t1.party_id  =  t2.party_id WHERE t2.form_id  =  (SELECT form_id FROM party_forms GROUP BY form_id ORDER BY count(*) DESC LIMIT 1)
Database: e_government
Question: What are the party emails associated with parties that used the party form that is the most common?
SQL: SELECT t1.party_email FROM parties AS t1 JOIN party_forms AS t2 ON t1.party_id  =  t2.party_id WHERE t2.form_id  =  (SELECT form_id FROM party_forms GROUP BY form_id ORDER BY count(*) DESC LIMIT 1)
Database: e_government
Question: List all the name of organizations in order of the date formed.
SQL: SELECT organization_name FROM organizations ORDER BY date_formed ASC
Database: e_government
Question: What are the names of organizations, ordered by the date they were formed, ascending?
SQL: SELECT organization_name FROM organizations ORDER BY date_formed ASC
Database: e_government
Question: Find the name of the youngest organization.
SQL: SELECT organization_name FROM organizations ORDER BY date_formed DESC LIMIT 1
Database: e_government
Question: What is the name of the organization that was formed most recently?
SQL: SELECT organization_name FROM organizations ORDER BY date_formed DESC LIMIT 1
Database: e_government
Question: Find the last name of the latest contact individual of the organization "Labour Party".
SQL: SELECT t3.individual_last_name FROM organizations AS t1 JOIN organization_contact_individuals AS t2 ON t1.organization_id  =  t2.organization_id JOIN individuals AS t3 ON t2.individual_id  =  t3.individual_id WHERE t1.organization_name  =  "Labour Party" ORDER BY t2.date_contact_to DESC LIMIT 1
Database: e_government
Question: What is the last name of the contact individual from the Labour party organization who was contacted most recently?
SQL: SELECT t3.individual_last_name FROM organizations AS t1 JOIN organization_contact_individuals AS t2 ON t1.organization_id  =  t2.organization_id JOIN individuals AS t3 ON t2.individual_id  =  t3.individual_id WHERE t1.organization_name  =  "Labour Party" ORDER BY t2.date_contact_to DESC LIMIT 1
Database: e_government
Question: Find the last name of the first ever contact person of the organization with the highest UK Vat number.
SQL: SELECT t3.individual_last_name FROM organizations AS t1 JOIN organization_contact_individuals AS t2 ON t1.organization_id  =  t2.organization_id JOIN individuals AS t3 ON t2.individual_id  =  t3.individual_id WHERE t1.uk_vat_number  =  (SELECT max(uk_vat_number) FROM organizations) ORDER BY t2.date_contact_to ASC LIMIT 1
Database: e_government
Question: What is the last name of the first individual contacted from the organization with the maximum UK Vat number across all organizations?
SQL: SELECT t3.individual_last_name FROM organizations AS t1 JOIN organization_contact_individuals AS t2 ON t1.organization_id  =  t2.organization_id JOIN individuals AS t3 ON t2.individual_id  =  t3.individual_id WHERE t1.uk_vat_number  =  (SELECT max(uk_vat_number) FROM organizations) ORDER BY t2.date_contact_to ASC LIMIT 1
Database: e_government
Question: How many services are there?
SQL: SELECT count(*) FROM services
Database: e_government
Question: Count the number of services.
SQL: SELECT count(*) FROM services
Database: e_government
Question: Find name of the services that has never been used.
SQL: SELECT service_name FROM services EXCEPT SELECT t1.service_name FROM services AS t1 JOIN party_services AS t2 ON t1.service_id  =  t2.service_id
Database: e_government
Question: What are the names of the services that have never been used?
SQL: SELECT service_name FROM services EXCEPT SELECT t1.service_name FROM services AS t1 JOIN party_services AS t2 ON t1.service_id  =  t2.service_id
Database: e_government
Question: Find the name of all the cities and states.
SQL: SELECT town_city FROM addresses UNION SELECT state_province_county FROM addresses
Database: e_government
Question: What are the names of all cities and states?
SQL: SELECT town_city FROM addresses UNION SELECT state_province_county FROM addresses
Database: e_government
Question: How many cities are there in state "Colorado"?
SQL: SELECT count(*) FROM addresses WHERE state_province_county  =  "Colorado"
Database: e_government
Question: Count the number of cities in the state of Colorado.
SQL: SELECT count(*) FROM addresses WHERE state_province_county  =  "Colorado"
Database: e_government
Question: Find the payment method code used by more than 3 parties.
SQL: SELECT payment_method_code FROM parties GROUP BY payment_method_code HAVING count(*)  >  3
Database: e_government
Question: What are the payment method codes that have been used by more than 3 parties?
SQL: SELECT payment_method_code FROM parties GROUP BY payment_method_code HAVING count(*)  >  3
Database: e_government
Question: Find the name of organizations whose names contain "Party".
SQL: SELECT organization_name FROM organizations WHERE organization_name LIKE "%Party%"
Database: e_government
Question: What are the names of organizations that contain the word "Party"?
SQL: SELECT organization_name FROM organizations WHERE organization_name LIKE "%Party%"
Database: e_government
Question: How many distinct payment methods are used by parties?
SQL: SELECT count(DISTINCT payment_method_code) FROM parties
Database: e_government
Question: Count the number of different payment method codes used by parties.
SQL: SELECT count(DISTINCT payment_method_code) FROM parties
Database: e_government
Question: Which is the email of the party that has used the services the most number of times?
SQL: SELECT t1.party_email FROM parties AS t1 JOIN party_services AS t2 ON t1.party_id  =  t2.customer_id GROUP BY t1.party_email ORDER BY count(*) DESC LIMIT 1
Database: e_government
Question: Return the party email that has used party services the greatest number of times.
SQL: SELECT t1.party_email FROM parties AS t1 JOIN party_services AS t2 ON t1.party_id  =  t2.customer_id GROUP BY t1.party_email ORDER BY count(*) DESC LIMIT 1
Database: e_government
Question: Which state can address "6862 Kaitlyn Knolls" possibly be in?
SQL: SELECT state_province_county FROM addresses WHERE line_1_number_building LIKE "%6862 Kaitlyn Knolls%"
Database: e_government
Question: Give the state corresponding to the line number building "6862 Kaitlyn Knolls".
SQL: SELECT state_province_county FROM addresses WHERE line_1_number_building LIKE "%6862 Kaitlyn Knolls%"
Database: e_government
Question: What is the name of organization that has the greatest number of contact individuals?
SQL: SELECT t1.organization_name FROM organizations AS t1 JOIN organization_contact_individuals AS t2 ON t1.organization_id  =  t2.organization_id GROUP BY t1.organization_name ORDER BY count(*) DESC LIMIT 1
Database: e_government
Question: Return the name of the organization which has the most contact individuals.
SQL: SELECT t1.organization_name FROM organizations AS t1 JOIN organization_contact_individuals AS t2 ON t1.organization_id  =  t2.organization_id GROUP BY t1.organization_name ORDER BY count(*) DESC LIMIT 1
Database: e_government
Question: Find the last name of the individuals that have been contact individuals of an organization.
SQL: SELECT DISTINCT t1.individual_last_name FROM individuals AS t1 JOIN organization_contact_individuals AS t2 ON t1.individual_id  =  t2.individual_id
Database: e_government
Question: What are the last names of individuals who have been contact individuals for an organization?
SQL: SELECT DISTINCT t1.individual_last_name FROM individuals AS t1 JOIN organization_contact_individuals AS t2 ON t1.individual_id  =  t2.individual_id
Database: school_bus
Question: How many drivers are there?
SQL: SELECT count(*) FROM driver
Database: school_bus
Question: Show the name, home city, and age for all drivers.
SQL: SELECT name ,  home_city ,  age FROM driver
Database: school_bus
Question: Show the party and the number of drivers in each party.
SQL: SELECT party ,  count(*) FROM driver GROUP BY party
Database: school_bus
Question: Show the name of drivers in descending order of age.
SQL: SELECT name FROM driver ORDER BY age DESC
Database: school_bus
Question: Show all different home cities.
SQL: SELECT DISTINCT home_city FROM driver
Database: school_bus
Question: Show the home city with the most number of drivers.
SQL: SELECT home_city FROM driver GROUP BY home_city ORDER BY count(*) DESC LIMIT 1
Database: school_bus
Question: Show the party with drivers from Hartford and drivers older than 40.
SQL: SELECT party FROM driver WHERE home_city  =  'Hartford' AND age  >  40
Database: school_bus
Question: Show home city where at least two drivers older than 40 are from.
SQL: SELECT home_city FROM driver WHERE age  >  40 GROUP BY home_city HAVING count(*)  >=  2
Database: school_bus
Question: Show all home cities except for those having a driver older than 40.
SQL: SELECT home_city FROM driver EXCEPT SELECT home_city FROM driver WHERE age  >  40
Database: school_bus
Question: Show the names of the drivers without a school bus.
SQL: SELECT name FROM driver WHERE driver_id NOT IN (SELECT driver_id FROM school_bus)
Database: school_bus
Question: Show the types of schools that have two schools.
SQL: SELECT TYPE FROM school GROUP BY TYPE HAVING count(*)  =  2
Database: school_bus
Question: Show the school name and driver name for all school buses.
SQL: SELECT T2.school ,  T3.name FROM school_bus AS T1 JOIN school AS T2 ON T1.school_id  =  T2.school_id JOIN driver AS T3 ON T1.driver_id  =  T3.driver_id
Database: school_bus
Question: What is the maximum, minimum and average years spent working on a school bus?
SQL: SELECT max(years_working) ,  min(years_working) ,  avg(years_working) FROM school_bus
Database: school_bus
Question: Show the school name and type for schools without a school bus.
SQL: SELECT school ,  TYPE FROM school WHERE school_id NOT IN (SELECT school_id FROM school_bus)
Database: school_bus
Question: Show the type of school and the number of buses for each type.
SQL: SELECT T2.type ,  count(*) FROM school_bus AS T1 JOIN school AS T2 ON T1.school_id  =  T2.school_id GROUP BY T2.type
Database: school_bus
Question: How many drivers are from Hartford city or younger than 40?
SQL: SELECT count(*) FROM driver WHERE home_city  =  'Hartford' OR age  <  40
Database: school_bus
Question: List names for drivers from Hartford city and younger than 40.
SQL: SELECT name FROM driver WHERE home_city  =  'Hartford' AND age  <  40
Database: school_bus
Question: find the name of driver who is driving the school bus with the longest working history.
SQL: SELECT t1.name FROM driver AS t1 JOIN school_bus AS t2 ON t1.driver_id  =  t2.driver_id ORDER BY years_working DESC LIMIT 1
Database: flight_company
Question: How many flights have a velocity larger than 200?
SQL: SELECT count(*) FROM flight WHERE velocity  >  200
Database: flight_company
Question: List the vehicle flight number, date and pilot of all the flights, ordered by altitude.
SQL: SELECT vehicle_flight_number ,  date ,  pilot FROM flight ORDER BY altitude ASC
Database: flight_company
Question: List the id, country, city and name of the airports ordered alphabetically by the name.
SQL: SELECT id ,  country ,  city ,  name FROM airport ORDER BY name
Database: flight_company
Question: What is maximum group equity shareholding of the companies?
SQL: SELECT max(group_equity_shareholding) FROM operate_company
Database: flight_company
Question: What is the velocity of the pilot named 'Thompson'?
SQL: SELECT avg(velocity) FROM flight WHERE pilot  =  'Thompson'
Database: flight_company
Question: What are the names and types of the companies that have ever operated a flight?
SQL: SELECT T1.name ,  T1.type FROM operate_company AS T1 JOIN flight AS t2 ON T1.id  =  T2.company_id
Database: flight_company
Question: What are the names of the airports which are not in the country 'Iceland'?
SQL: SELECT name FROM airport WHERE country != 'Iceland'
Database: flight_company
Question: What are the distinct types of the companies that have operated any flights with velocity less than 200?
SQL: SELECT DISTINCT T1.type FROM operate_company AS T1 JOIN flight AS t2 ON T1.id  =  T2.company_id WHERE T2.velocity  <  200
Database: flight_company
Question: What are the ids and names of the companies that operated more than one flight?
SQL: SELECT T1.id ,  T1.name FROM operate_company AS T1 JOIN flight AS t2 ON T1.id  =  T2.company_id GROUP BY T1.id HAVING count(*)  >  1
Database: flight_company
Question: What is the id, name and IATA code of the airport that had most number of flights?
SQL: SELECT T1.id ,  T1.name ,  T1.IATA FROM airport AS T1 JOIN flight AS T2 ON T1.id  =  T2.airport_id GROUP BY T2.id ORDER BY count(*) DESC LIMIT 1
Database: flight_company
Question: What are the different pilot names who had piloted a flight in the country 'United States' or in the airport named 'Billund Airport'?
SQL: SELECT DISTINCT T2.pilot FROM airport AS T1 JOIN flight AS T2 ON T1.id  =  T2.airport_id WHERE T1.country  =  'United States' OR T1.name  =  'Billund Airport'
Database: flight_company
Question: What is the most common company type, and how many are there?
SQL: SELECT TYPE ,  count(*) FROM operate_company GROUP BY TYPE ORDER BY count(*) DESC LIMIT 1
Database: flight_company
Question: List the name of the pilots who have flied for both a company that mainly provide 'Cargo' services and a company that runs 'Catering services' activities.
SQL: SELECT T2.pilot FROM operate_company AS T1 JOIN flight AS t2 ON T1.id  =  T2.company_id WHERE T1.principal_activities  =  'Cargo' INTERSECT SELECT T2.pilot FROM operate_company AS T1 JOIN flight AS t2 ON T1.id  =  T2.company_id WHERE T1.principal_activities  =  'Catering services'
Database: flight_company
Question: Which of the airport names contains the word 'international'?
SQL: SELECT name FROM airport WHERE name LIKE '%international%'
Database: flight_company
Question: How many companies operates airlines in each airport?
SQL: SELECT T3.id ,  count(*) FROM operate_company AS T1 JOIN flight AS t2 ON T1.id  =  T2.company_id JOIN airport AS T3 ON T2.airport_id  =  T3.id GROUP BY T3.id
Database: flight_company
Question: how many airports are there in each country?
SQL: SELECT count(*) ,  country FROM airport GROUP BY country
Database: flight_company
Question: which countries have more than 2 airports?
SQL: SELECT country FROM airport GROUP BY country HAVING count(*)  >  2
Database: flight_company
Question: which pilot is in charge of the most number of flights?
SQL: SELECT pilot FROM flight GROUP BY pilot ORDER BY count(*) DESC LIMIT 1
Database: cre_Docs_and_Epenses
Question: How many accounts do we have?
SQL: SELECT count(*) FROM Accounts
Database: cre_Docs_and_Epenses
Question: Count the number of accounts.
SQL: SELECT count(*) FROM Accounts
Database: cre_Docs_and_Epenses
Question: Show all account ids and account details.
SQL: SELECT account_id ,  account_details FROM Accounts
Database: cre_Docs_and_Epenses
Question: What are the ids and details of all accounts?
SQL: SELECT account_id ,  account_details FROM Accounts
Database: cre_Docs_and_Epenses
Question: How many statements do we have?
SQL: SELECT count(*) FROM Statements
Database: cre_Docs_and_Epenses
Question: Count the number of statements.
SQL: SELECT count(*) FROM Statements
Database: cre_Docs_and_Epenses
Question: List all statement ids and statement details.
SQL: SELECT STATEMENT_ID ,  statement_details FROM Statements
Database: cre_Docs_and_Epenses
Question: What are the ids and details of all statements?
SQL: SELECT STATEMENT_ID ,  statement_details FROM Statements
Database: cre_Docs_and_Epenses
Question: Show statement id, statement detail, account detail for accounts.
SQL: SELECT T1.statement_id ,  T2.statement_details ,  T1.account_details FROM Accounts AS T1 JOIN Statements AS T2 ON T1.statement_id  =  T2.statement_id
Database: cre_Docs_and_Epenses
Question: What are the statement ids, statement details, and account details, for all accounts?
SQL: SELECT T1.statement_id ,  T2.statement_details ,  T1.account_details FROM Accounts AS T1 JOIN Statements AS T2 ON T1.statement_id  =  T2.statement_id
Database: cre_Docs_and_Epenses
Question: Show all statement id and the number of accounts for each statement.
SQL: SELECT STATEMENT_ID ,  count(*) FROM Accounts GROUP BY STATEMENT_ID
Database: cre_Docs_and_Epenses
Question: What are the different statement ids on accounts, and the number of accounts for each?
SQL: SELECT STATEMENT_ID ,  count(*) FROM Accounts GROUP BY STATEMENT_ID
Database: cre_Docs_and_Epenses
Question: Show the statement id and the statement detail for the statement with most number of accounts.
SQL: SELECT T1.statement_id ,  T2.statement_details FROM Accounts AS T1 JOIN Statements AS T2 ON T1.statement_id  =  T2.statement_id GROUP BY T1.statement_id ORDER BY count(*) DESC LIMIT 1
Database: cre_Docs_and_Epenses
Question: What are the statement id and statement detail for the statement that has the most corresponding accounts?
SQL: SELECT T1.statement_id ,  T2.statement_details FROM Accounts AS T1 JOIN Statements AS T2 ON T1.statement_id  =  T2.statement_id GROUP BY T1.statement_id ORDER BY count(*) DESC LIMIT 1
Database: cre_Docs_and_Epenses
Question: Show the number of documents.
SQL: SELECT count(*) FROM Documents
Database: cre_Docs_and_Epenses
Question: Count the number of documents.
SQL: SELECT count(*) FROM Documents
Database: cre_Docs_and_Epenses
Question: List the document type code, document name, and document description for the document with name 'Noel CV' or name 'King Book'.
SQL: SELECT document_type_code ,  document_name ,  document_description FROM Documents WHERE document_name  =  'Noel CV' OR document_name  =  'King Book'
Database: cre_Docs_and_Epenses
Question: What are the type come, name, and description of the document that has either the name 'Noel CV' or 'King Book'?
SQL: SELECT document_type_code ,  document_name ,  document_description FROM Documents WHERE document_name  =  'Noel CV' OR document_name  =  'King Book'
Database: cre_Docs_and_Epenses
Question: Show the ids and names of all documents.
SQL: SELECT document_id ,  document_name FROM Documents
Database: cre_Docs_and_Epenses
Question: What are the ids and names for each of the documents?
SQL: SELECT document_id ,  document_name FROM Documents
Database: cre_Docs_and_Epenses
Question: Find names and ids of all documents with document type code BK.
SQL: SELECT document_name ,  document_id FROM Documents WHERE document_type_code  =  "BK"
Database: cre_Docs_and_Epenses
Question: What are the names and ids of documents that have the type code BK?
SQL: SELECT document_name ,  document_id FROM Documents WHERE document_type_code  =  "BK"
Database: cre_Docs_and_Epenses
Question: How many documents are with document type code BK for each product id?
SQL: SELECT count(*) ,  project_id FROM Documents WHERE document_type_code  =  "BK" GROUP BY project_id
Database: cre_Docs_and_Epenses
Question: Count the number of documents with the type code BK that correspond to each product id.
SQL: SELECT count(*) ,  project_id FROM Documents WHERE document_type_code  =  "BK" GROUP BY project_id
Database: cre_Docs_and_Epenses
Question: Show the document name and the document date for all documents on project with details 'Graph Database project'.
SQL: SELECT document_name ,  document_date FROM Documents AS T1 JOIN projects AS T2 ON T1.project_id  =  T2.project_id WHERE T2.project_details  =  'Graph Database project'
Database: cre_Docs_and_Epenses
Question: What are the names and dates for documents corresponding to project that has the details 'Graph Database project'?
SQL: SELECT document_name ,  document_date FROM Documents AS T1 JOIN projects AS T2 ON T1.project_id  =  T2.project_id WHERE T2.project_details  =  'Graph Database project'
Database: cre_Docs_and_Epenses
Question: Show project ids and the number of documents in each project.
SQL: SELECT project_id ,  count(*) FROM Documents GROUP BY project_id
Database: cre_Docs_and_Epenses
Question: How many documents correspond with each project id?
SQL: SELECT project_id ,  count(*) FROM Documents GROUP BY project_id
Database: cre_Docs_and_Epenses
Question: What is the id of the project with least number of documents?
SQL: SELECT project_id FROM Documents GROUP BY project_id ORDER BY count(*) ASC LIMIT 1
Database: cre_Docs_and_Epenses
Question: Return the id of the project that has the fewest corresponding documents.
SQL: SELECT project_id FROM Documents GROUP BY project_id ORDER BY count(*) ASC LIMIT 1
Database: cre_Docs_and_Epenses
Question: Show the ids for projects with at least 2 documents.
SQL: SELECT project_id FROM Documents GROUP BY project_id HAVING count(*)  >=  2
Database: cre_Docs_and_Epenses
Question: What are project ids of projects that have 2 or more corresponding documents?
SQL: SELECT project_id FROM Documents GROUP BY project_id HAVING count(*)  >=  2
Database: cre_Docs_and_Epenses
Question: List document type codes and the number of documents in each code.
SQL: SELECT document_type_code ,  count(*) FROM Documents GROUP BY document_type_code
Database: cre_Docs_and_Epenses
Question: How many documents are there of each type?
SQL: SELECT document_type_code ,  count(*) FROM Documents GROUP BY document_type_code
Database: cre_Docs_and_Epenses
Question: What is the document type code with most number of documents?
SQL: SELECT document_type_code FROM Documents GROUP BY document_type_code ORDER BY count(*) DESC LIMIT 1
Database: cre_Docs_and_Epenses
Question: Return the code of the document type that is most common.
SQL: SELECT document_type_code FROM Documents GROUP BY document_type_code ORDER BY count(*) DESC LIMIT 1
Database: cre_Docs_and_Epenses
Question: Show the document type code with fewer than 3 documents.
SQL: SELECT document_type_code FROM Documents GROUP BY document_type_code HAVING count(*)  <  3
Database: cre_Docs_and_Epenses
Question: What are the codes corresponding to document types for which there are less than 3 documents?
SQL: SELECT document_type_code FROM Documents GROUP BY document_type_code HAVING count(*)  <  3
Database: cre_Docs_and_Epenses
Question: Show the statement detail and the corresponding document name for the statement with detail 'Private Project'.
SQL: SELECT T1.statement_details ,  T2.document_name FROM Statements AS T1 JOIN Documents AS T2 ON T1.statement_id  =  T2.document_id WHERE T1.statement_details  =  'Private Project'
Database: cre_Docs_and_Epenses
Question: What are the details for statements with the details 'Private Project', and what are the names of the corresponding documents?
SQL: SELECT T1.statement_details ,  T2.document_name FROM Statements AS T1 JOIN Documents AS T2 ON T1.statement_id  =  T2.document_id WHERE T1.statement_details  =  'Private Project'
Database: cre_Docs_and_Epenses
Question: Show all document type codes, document type names, document type descriptions.
SQL: SELECT document_type_code ,  document_type_name ,  document_type_description FROM Ref_document_types
Database: cre_Docs_and_Epenses
Question: What are the codes, names, and descriptions of the different document types?
SQL: SELECT document_type_code ,  document_type_name ,  document_type_description FROM Ref_document_types
Database: cre_Docs_and_Epenses
Question: What is the document type description for document type named Film?
SQL: SELECT document_type_description FROM Ref_document_types WHERE document_type_name  =  "Film"
Database: cre_Docs_and_Epenses
Question: Return the description of the document type name 'Film'.
SQL: SELECT document_type_description FROM Ref_document_types WHERE document_type_name  =  "Film"
Database: cre_Docs_and_Epenses
Question: What is the document type name and the document type description and creation date for all the documents?
SQL: SELECT T1.document_type_name ,  T1.document_type_description ,  T2.Document_date FROM Ref_document_types AS T1 JOIN Documents AS T2 ON T1.document_type_code  =  T2.document_type_code
Database: cre_Docs_and_Epenses
Question: Return the type name, type description, and date of creation for each document.
SQL: SELECT T1.document_type_name ,  T1.document_type_description ,  T2.Document_date FROM Ref_document_types AS T1 JOIN Documents AS T2 ON T1.document_type_code  =  T2.document_type_code
Database: cre_Docs_and_Epenses
Question: Show the number of projects.
SQL: SELECT count(*) FROM Projects
Database: cre_Docs_and_Epenses
Question: How many projects are there?
SQL: SELECT count(*) FROM Projects
Database: cre_Docs_and_Epenses
Question: List ids and details for all projects.
SQL: SELECT project_id ,  project_details FROM Projects
Database: cre_Docs_and_Epenses
Question: What are the ids and details for each project?
SQL: SELECT project_id ,  project_details FROM Projects
Database: cre_Docs_and_Epenses
Question: What is the project id and detail for the project with at least two documents?
SQL: SELECT T1.project_id ,  T1.project_details FROM Projects AS T1 JOIN Documents AS T2 ON T1.project_id  =  T2.project_id GROUP BY T1.project_id HAVING count(*)  >  2
Database: cre_Docs_and_Epenses
Question: Return the ids and details corresponding to projects for which there are more than two documents.
SQL: SELECT T1.project_id ,  T1.project_details FROM Projects AS T1 JOIN Documents AS T2 ON T1.project_id  =  T2.project_id GROUP BY T1.project_id HAVING count(*)  >  2
Database: cre_Docs_and_Epenses
Question: What is the project detail for the project with document "King Book"?
SQL: SELECT T1.project_details FROM Projects AS T1 JOIN Documents AS T2 ON T1.project_id  =  T2.project_id WHERE T2.document_name  =  "King Book"
Database: cre_Docs_and_Epenses
Question: Give the details of the project with the document name 'King Book'.
SQL: SELECT T1.project_details FROM Projects AS T1 JOIN Documents AS T2 ON T1.project_id  =  T2.project_id WHERE T2.document_name  =  "King Book"
Database: cre_Docs_and_Epenses
Question: How many budget types do we have?
SQL: SELECT count(*) FROM Ref_budget_codes
Database: cre_Docs_and_Epenses
Question: Count the number of budget codes.
SQL: SELECT count(*) FROM Ref_budget_codes
Database: cre_Docs_and_Epenses
Question: List all budget type codes and descriptions.
SQL: SELECT budget_type_code ,  budget_type_description FROM Ref_budget_codes
Database: cre_Docs_and_Epenses
Question: What are the type codes and descriptions of each budget type?
SQL: SELECT budget_type_code ,  budget_type_description FROM Ref_budget_codes
Database: cre_Docs_and_Epenses
Question: What is the description for the budget type with code ORG?
SQL: SELECT budget_type_description FROM Ref_budget_codes WHERE budget_type_code  =  "ORG"
Database: cre_Docs_and_Epenses
Question: Return the description of the budget type that has the code ORG.
SQL: SELECT budget_type_description FROM Ref_budget_codes WHERE budget_type_code  =  "ORG"
Database: cre_Docs_and_Epenses
Question: How many documents have expenses?
SQL: SELECT count(*) FROM Documents_with_expenses
Database: cre_Docs_and_Epenses
Question: Count the number of documents with expenses.
SQL: SELECT count(*) FROM Documents_with_expenses
Database: cre_Docs_and_Epenses
Question: What are the document ids for the budget type code 'SF'?
SQL: SELECT document_id FROM Documents_with_expenses WHERE budget_type_code  =  'SF'
Database: cre_Docs_and_Epenses
Question: Give the ids of documents with expenses that have the budget code 'SF'.
SQL: SELECT document_id FROM Documents_with_expenses WHERE budget_type_code  =  'SF'
Database: cre_Docs_and_Epenses
Question: Show the budget type code and description and the corresponding document id.
SQL: SELECT T2.budget_type_code ,  T2.budget_type_description ,  T1.document_id FROM Documents_with_expenses AS T1 JOIN Ref_budget_codes AS T2 ON T1.budget_type_code  =  T2.budget_type_code
Database: cre_Docs_and_Epenses
Question: Return the budget type codes, budget type descriptions and document ids for documents with expenses.
SQL: SELECT T2.budget_type_code ,  T2.budget_type_description ,  T1.document_id FROM Documents_with_expenses AS T1 JOIN Ref_budget_codes AS T2 ON T1.budget_type_code  =  T2.budget_type_code
Database: cre_Docs_and_Epenses
Question: Show ids for all documents with budget types described as 'Government'.
SQL: SELECT T1.document_id FROM Documents_with_expenses AS T1 JOIN Ref_Budget_Codes AS T2 ON T1.Budget_Type_code  =  T2.Budget_Type_code WHERE T2.budget_type_Description  =  "Government"
Database: cre_Docs_and_Epenses
Question: Give the ids for documents that have the budget description 'Government'.
SQL: SELECT T1.document_id FROM Documents_with_expenses AS T1 JOIN Ref_Budget_Codes AS T2 ON T1.Budget_Type_code  =  T2.Budget_Type_code WHERE T2.budget_type_Description  =  "Government"
Database: cre_Docs_and_Epenses
Question: Show budget type codes and the number of documents in each budget type.
SQL: SELECT budget_type_code ,  count(*) FROM Documents_with_expenses GROUP BY budget_type_code
Database: cre_Docs_and_Epenses
Question: What are the different budget type codes, and how many documents are there for each?
SQL: SELECT budget_type_code ,  count(*) FROM Documents_with_expenses GROUP BY budget_type_code
Database: cre_Docs_and_Epenses
Question: What is the budget type code with most number of documents.
SQL: SELECT budget_type_code FROM Documents_with_expenses GROUP BY budget_type_code ORDER BY count(*) DESC LIMIT 1
Database: cre_Docs_and_Epenses
Question: Give the budget type code that is most common among documents with expenses.
SQL: SELECT budget_type_code FROM Documents_with_expenses GROUP BY budget_type_code ORDER BY count(*) DESC LIMIT 1
Database: cre_Docs_and_Epenses
Question: What are the ids of documents which don't have expense budgets?
SQL: SELECT document_id FROM Documents EXCEPT SELECT document_id FROM Documents_with_expenses
Database: cre_Docs_and_Epenses
Question: Return the ids of documents that do not have expenses.
SQL: SELECT document_id FROM Documents EXCEPT SELECT document_id FROM Documents_with_expenses
Database: cre_Docs_and_Epenses
Question: Show ids for all documents in type CV without expense budgets.
SQL: SELECT document_id FROM Documents WHERE document_type_code  =  "CV" EXCEPT SELECT document_id FROM Documents_with_expenses
Database: cre_Docs_and_Epenses
Question: What are the ids of documents with the type code CV that do not have expenses.
SQL: SELECT document_id FROM Documents WHERE document_type_code  =  "CV" EXCEPT SELECT document_id FROM Documents_with_expenses
Database: cre_Docs_and_Epenses
Question: What are the ids of documents with letter 's' in the name with any expense budgets.
SQL: SELECT T1.document_id FROM Documents AS T1 JOIN Documents_with_expenses AS T2 ON T1.document_id  =  T2.document_id WHERE T1.document_name LIKE '%s%'
Database: cre_Docs_and_Epenses
Question: Give the ids of documents that have expenses and contain the letter s in their names.
SQL: SELECT T1.document_id FROM Documents AS T1 JOIN Documents_with_expenses AS T2 ON T1.document_id  =  T2.document_id WHERE T1.document_name LIKE '%s%'
Database: cre_Docs_and_Epenses
Question: How many documents do not have any expense?
SQL: SELECT count(*) FROM Documents WHERE document_id NOT IN ( SELECT document_id FROM Documents_with_expenses )
Database: cre_Docs_and_Epenses
Question: Count the number of documents that do not have expenses.
SQL: SELECT count(*) FROM Documents WHERE document_id NOT IN ( SELECT document_id FROM Documents_with_expenses )
Database: cre_Docs_and_Epenses
Question: What are the dates for the documents with both 'GV' type and 'SF' type expenses?
SQL: SELECT T1.document_date FROM Documents AS T1 JOIN Documents_with_Expenses AS T2 ON T1.document_id  =  T2.document_id WHERE T2.budget_type_code  =  'GV' INTERSECT SELECT T1.document_date FROM Documents AS T1 JOIN Documents_with_Expenses AS T2 ON T1.document_id  =  T2.document_id WHERE T2.budget_type_code  =  'SF'
Database: cre_Docs_and_Epenses
Question: Give the dates of creation for documents that have both budget type codes 'GV' and 'SF'.
SQL: SELECT T1.document_date FROM Documents AS T1 JOIN Documents_with_Expenses AS T2 ON T1.document_id  =  T2.document_id WHERE T2.budget_type_code  =  'GV' INTERSECT SELECT T1.document_date FROM Documents AS T1 JOIN Documents_with_Expenses AS T2 ON T1.document_id  =  T2.document_id WHERE T2.budget_type_code  =  'SF'
Database: cre_Docs_and_Epenses
Question: What are the account details with the largest value or with value having char '5' in it?
SQL: SELECT max(Account_details) FROM Accounts UNION SELECT Account_details FROM Accounts WHERE Account_details LIKE "%5%"
Database: cre_Docs_and_Epenses
Question: Return the account details with the greatest value, as well as those that include the character 5.
SQL: SELECT max(Account_details) FROM Accounts UNION SELECT Account_details FROM Accounts WHERE Account_details LIKE "%5%"
Database: scientist_1
Question: Find the total number of scientists.
SQL: SELECT count(*) FROM scientists
Database: scientist_1
Question: How many scientists are there?
SQL: SELECT count(*) FROM scientists
Database: scientist_1
Question: Find the total hours of all projects.
SQL: SELECT sum(hours) FROM projects
Database: scientist_1
Question: What is the total number of hours for all projects?
SQL: SELECT sum(hours) FROM projects
Database: scientist_1
Question: How many different scientists are assigned to any project?
SQL: SELECT count(DISTINCT scientist) FROM assignedto
Database: scientist_1
Question: Count the number of different scientists assigned to any project.
SQL: SELECT count(DISTINCT scientist) FROM assignedto
Database: scientist_1
Question: Find the number of distinct projects.
SQL: SELECT count(DISTINCT name) FROM projects
Database: scientist_1
Question: How many different projects are there?
SQL: SELECT count(DISTINCT name) FROM projects
Database: scientist_1
Question: Find the average hours of all projects.
SQL: SELECT avg(hours) FROM projects
Database: scientist_1
Question: What is the average hours across all projects?
SQL: SELECT avg(hours) FROM projects
Database: scientist_1
Question: Find the name of project that continues for the longest time.
SQL: SELECT name FROM projects ORDER BY hours DESC LIMIT 1
Database: scientist_1
Question: What is the name of the project with the most hours?
SQL: SELECT name FROM projects ORDER BY hours DESC LIMIT 1
Database: scientist_1
Question: List the name of all projects that are operated longer than the average working hours of all projects.
SQL: SELECT name FROM projects WHERE hours  >  (SELECT avg(hours) FROM projects)
Database: scientist_1
Question: What are the names of projects that have taken longer than the average number of hours for all projects?
SQL: SELECT name FROM projects WHERE hours  >  (SELECT avg(hours) FROM projects)
Database: scientist_1
Question: Find the name and hours of project that has the most number of scientists.
SQL: SELECT T1.name ,  T1.hours FROM projects AS T1 JOIN assignedto AS T2 ON T1.code  =  T2.project GROUP BY T2.project ORDER BY count(*) DESC LIMIT 1
Database: scientist_1
Question: What is the name and hours for the project which has the most scientists assigned to it?
SQL: SELECT T1.name ,  T1.hours FROM projects AS T1 JOIN assignedto AS T2 ON T1.code  =  T2.project GROUP BY T2.project ORDER BY count(*) DESC LIMIT 1
Database: scientist_1
Question: Find the name of the project for which a scientist whose name contains ‘Smith’ is assigned to.
SQL: SELECT T2.name FROM assignedto AS T1 JOIN projects AS T2 ON T1.project  =  T2.code JOIN scientists AS T3 ON T1.scientist  =  T3.SSN WHERE T3.name LIKE '%Smith%'
Database: scientist_1
Question: What is the name of the project that has a scientist assigned to it whose name contains 'Smith'?
SQL: SELECT T2.name FROM assignedto AS T1 JOIN projects AS T2 ON T1.project  =  T2.code JOIN scientists AS T3 ON T1.scientist  =  T3.SSN WHERE T3.name LIKE '%Smith%'
Database: scientist_1
Question: Find the total hours of the projects that scientists named Michael Rogers or Carol Smith are assigned to.
SQL: SELECT sum(T2.hours) FROM assignedto AS T1 JOIN projects AS T2 ON T1.project  =  T2.code JOIN scientists AS T3 ON T1.scientist  =  T3.SSN WHERE T3.name  =  'Michael Rogers' OR T3.name  =  'Carol Smith'
Database: scientist_1
Question: What is the sum of hours for projects that scientists with the name Michael Rogers or Carol Smith are assigned to?
SQL: SELECT sum(T2.hours) FROM assignedto AS T1 JOIN projects AS T2 ON T1.project  =  T2.code JOIN scientists AS T3 ON T1.scientist  =  T3.SSN WHERE T3.name  =  'Michael Rogers' OR T3.name  =  'Carol Smith'
Database: scientist_1
Question: Find the name of projects that require between 100 and 300 hours of work.
SQL: SELECT name FROM projects WHERE hours BETWEEN 100 AND 300
Database: scientist_1
Question: What are the names of projects that require between 100 and 300 hours?
SQL: SELECT name FROM projects WHERE hours BETWEEN 100 AND 300
Database: scientist_1
Question: Find the name of the scientist who worked on both a project named 'Matter of Time' and a project named 'A Puzzling Parallax'.
SQL: SELECT T3.name FROM assignedto AS T1 JOIN projects AS T2 ON T1.project  =  T2.code JOIN scientists AS T3 ON T1.scientist  =  T3.SSN WHERE T2.name  =  'Matter of Time' INTERSECT SELECT T3.name FROM assignedto AS T1 JOIN projects AS T2 ON T1.project  =  T2.code JOIN scientists AS T3 ON T1.scientist  =  T3.SSN WHERE T2.name  =  'A Puzzling Parallax'
Database: scientist_1
Question: What are the names of any scientists who worked on projects named 'Matter of Time' and 'A Puzzling Pattern'?
SQL: SELECT T3.name FROM assignedto AS T1 JOIN projects AS T2 ON T1.project  =  T2.code JOIN scientists AS T3 ON T1.scientist  =  T3.SSN WHERE T2.name  =  'Matter of Time' INTERSECT SELECT T3.name FROM assignedto AS T1 JOIN projects AS T2 ON T1.project  =  T2.code JOIN scientists AS T3 ON T1.scientist  =  T3.SSN WHERE T2.name  =  'A Puzzling Parallax'
Database: scientist_1
Question: List the names of all scientists sorted in alphabetical order.
SQL: SELECT name FROM scientists ORDER BY name
Database: scientist_1
Question: What are the names of all the scientists in alphabetical order?
SQL: SELECT name FROM scientists ORDER BY name
Database: scientist_1
Question: Find the number of scientists involved for each project name.
SQL: SELECT count(*) ,  T1.name FROM projects AS T1 JOIN assignedto AS T2 ON T1.code  =  T2.project GROUP BY T1.name
Database: scientist_1
Question: What are the naems of all the projects, and how many scientists were assigned to each of them?
SQL: SELECT count(*) ,  T1.name FROM projects AS T1 JOIN assignedto AS T2 ON T1.code  =  T2.project GROUP BY T1.name
Database: scientist_1
Question: Find the number of scientists involved for the projects that require more than 300 hours.
SQL: SELECT count(*) ,  T1.name FROM projects AS T1 JOIN assignedto AS T2 ON T1.code  =  T2.project WHERE T1.hours  >  300 GROUP BY T1.name
Database: scientist_1
Question: What are the names of projects that require more than 300 hours, and how many scientists are assigned to each?
SQL: SELECT count(*) ,  T1.name FROM projects AS T1 JOIN assignedto AS T2 ON T1.code  =  T2.project WHERE T1.hours  >  300 GROUP BY T1.name
Database: scientist_1
Question: Find the number of projects which each scientist is working on and scientist's name.
SQL: SELECT count(*) ,  T1.name FROM scientists AS T1 JOIN assignedto AS T2 ON T1.ssn  =  T2.scientist GROUP BY T1.name
Database: scientist_1
Question: What are the names of the scientists, and how many projects are each of them working on?
SQL: SELECT count(*) ,  T1.name FROM scientists AS T1 JOIN assignedto AS T2 ON T1.ssn  =  T2.scientist GROUP BY T1.name
Database: scientist_1
Question: Find the SSN and name of scientists who are assigned to the project with the longest hours.
SQL: SELECT T3.ssn ,  T3.name FROM assignedto AS T1 JOIN projects AS T2 ON T1.project  =  T2.code JOIN scientists AS T3 ON T1.scientist  =  T3.SSN WHERE T2.hours  =  (SELECT max(hours) FROM projects)
Database: scientist_1
Question: What are the SSN and names of scientists working on the project with the most hours?
SQL: SELECT T3.ssn ,  T3.name FROM assignedto AS T1 JOIN projects AS T2 ON T1.project  =  T2.code JOIN scientists AS T3 ON T1.scientist  =  T3.SSN WHERE T2.hours  =  (SELECT max(hours) FROM projects)
Database: scientist_1
Question: Find the name of scientists who are assigned to some project.
SQL: SELECT T2.name FROM assignedto AS T1 JOIN scientists AS T2 ON T1.scientist  =  T2.ssn
Database: scientist_1
Question: What are the names of scientists who are assigned to any project?
SQL: SELECT T2.name FROM assignedto AS T1 JOIN scientists AS T2 ON T1.scientist  =  T2.ssn
Database: scientist_1
Question: Select the project names which are not assigned yet.
SQL: SELECT Name FROM Projects WHERE Code NOT IN (SELECT Project FROM AssignedTo)
Database: scientist_1
Question: What are the names of projects that have not been assigned?
SQL: SELECT Name FROM Projects WHERE Code NOT IN (SELECT Project FROM AssignedTo)
Database: scientist_1
Question: Find the name of scientists who are not assigned to any project.
SQL: SELECT Name FROM scientists WHERE ssn NOT IN (SELECT scientist FROM AssignedTo)
Database: scientist_1
Question: What are the names of scientists who have not been assigned a project?
SQL: SELECT Name FROM scientists WHERE ssn NOT IN (SELECT scientist FROM AssignedTo)
Database: scientist_1
Question: Find the number of scientists who are not assigned to any project.
SQL: SELECT count(*) FROM scientists WHERE ssn NOT IN (SELECT scientist FROM AssignedTo)
Database: scientist_1
Question: How many scientists do not have any projects assigned to them?
SQL: SELECT count(*) FROM scientists WHERE ssn NOT IN (SELECT scientist FROM AssignedTo)
Database: scientist_1
Question: Find the names of scientists who are not working on the project with the highest hours.
SQL: SELECT name FROM scientists EXCEPT SELECT T3.name FROM assignedto AS T1 JOIN projects AS T2 ON T1.project  =  T2.code JOIN scientists AS T3 ON T1.scientist  =  T3.SSN WHERE T2.hours  =  (SELECT max(hours) FROM projects)
Database: scientist_1
Question: What are the names of scientists who are not working on the project with the most hours?
SQL: SELECT name FROM scientists EXCEPT SELECT T3.name FROM assignedto AS T1 JOIN projects AS T2 ON T1.project  =  T2.code JOIN scientists AS T3 ON T1.scientist  =  T3.SSN WHERE T2.hours  =  (SELECT max(hours) FROM projects)