Database: authors
Question: Find the paper ID, title, published year and journal's full name of the paper which included the most number in author.
Evidence: most number in author refers to Max (Count(PaperId))
SQL: SELECT T1.Id, T1.Title, T1.Year, T3.FullName FROM Paper AS T1 INNER JOIN PaperAuthor AS T2 ON T1.Id = T2.PaperId INNER JOIN Journal AS T3 ON T1.JournalId = T3.Id GROUP BY T2.AuthorId ORDER BY COUNT(T2.AuthorId) DESC LIMIT 1

Database: retails
Question: How many countries are there in the No.2 region?
Evidence: No.2 region refers to n_regionkey = 2;
SQL: SELECT COUNT(n_nationkey) FROM nation WHERE n_regionkey = 2

Database: ice_hockey_draft
Question: Among all goals scored by Calgary Hitmen in the 2007-2008 season, identify the percentage scored by Ian Schultz.
Evidence: goals scored refers to G; Calgary Hitmen refers to TEAM = 'Calgary Hitmen'; percentage = MULTIPLY(DIVIDE(SUM(G WHERE PlayerName = 'Ian Schultz'), SUM(G)), 100); 2007-2008 season refers to SEASON = '2007-2008';
SQL: SELECT CAST(SUM(CASE WHEN T2.PlayerName = 'Ian Schultz' THEN T1.G ELSE 0 END) AS REAL) * 100 / SUM(T1.G) FROM SeasonStatus AS T1 INNER JOIN PlayerInfo AS T2 ON T1.ELITEID = T2.ELITEID WHERE T1.SEASON = '2007-2008' AND T1.TEAM = 'Calgary Hitmen'

Database: retail_complains
Question: Which detailed product did Mr Lennox Oliver Drake complain about?
Evidence: detailed product refers to "Sub-product"; Mr refers to sex = 'Male';
SQL: SELECT DISTINCT T2.`Sub-product` FROM client AS T1 INNER JOIN events AS T2 ON T1.client_id = T2.Client_ID WHERE T1.first = 'Lennox' AND T1.middle = 'Oliver' AND T1.last = 'Drake' AND T1.sex = 'Male'

Database: legislator
Question: Which state did Veronica Grace Boland represent and which party is she affiliated?
Evidence: Veronica Grace Boland is a full name; full name refers to first_name, middle_name, last_name; party affiliated refers to party
SQL: SELECT T2.state, T2.party FROM historical AS T1 INNER JOIN `historical-terms` AS T2 ON T1.bioguide_id = T2.bioguide WHERE T1.first_name OR T1.middle_name OR T1.last_name = 'VeronicaGraceBoland'

Database: codebase_comments
Question: What is the task of the method that is in the Czech language?
Evidence: method refers to Name; task of the method refers to the second part of the Name after the "."; Czech language refers to Lang = 'cs'
SQL: SELECT DISTINCT SUBSTR(SUBSTR(Name, INSTR(Name, '.') + 1), 1, INSTR(SUBSTR(Name, INSTR(Name, '.') + 1), '.') - 1) task FROM Method WHERE Lang = 'cs'

Database: book_publishing_company
Question: What is the average quantity of each order for the book "Life Without Fear"?
Evidence: qty is abbreviation for quantity; average quantity order = AVG(qty)
SQL: SELECT CAST(SUM(T2.qty) AS REAL) / COUNT(T1.title_id) FROM titles AS T1 INNER JOIN sales AS T2 ON T1.title_id = T2.title_id WHERE T1.title = 'Life Without Fear'

Database: authors
Question: Write down the conference full name of "ICWE" and it's homepage address.
Evidence: "ICWE" is the ShortName of conference
SQL: SELECT FullName, Homepage FROM Conference WHERE ShortName = 'ICWE'

Database: synthea
Question: How many patients with a body weight of more than 100 kg have a 'diabetes self-management plan' care plan?
Evidence: body weight of more than 100 kg refers to observations.DESCRIPTION = 'Body Weight' AND observations.VALUE > 100 AND observations.UNITS = 'kg'; diabetes self-management plan refers to careplans.DESCRIPTION = 'Diabetes self management plan';
SQL: SELECT COUNT(DISTINCT T2.patient) FROM careplans AS T1 INNER JOIN patients AS T2 ON T1.PATIENT = T2.patient INNER JOIN observations AS T3 ON T2.patient = T3.PATIENT WHERE T3.DESCRIPTION = 'Body Weight' AND T1.DESCRIPTION = 'Diabetes self management plan' AND T3.VALUE > 100 AND T3.UNITS = 'kg'

Database: movie_3
Question: How many film titles were released in 2006?
Evidence: released in 2006 refers to release_year = 2006
SQL: SELECT COUNT(film_id) FROM film WHERE release_year = 2006

Database: law_episode
Question: Who is the tallest camera operator?
Evidence: who refers to name; the tallest refers to max(height_meters); camera operator refers to role = 'camera operator'
SQL: SELECT T2.name FROM Credit AS T1 INNER JOIN Person AS T2 ON T2.person_id = T1.person_id WHERE T1.role = 'camera operator' ORDER BY T2.height_meters DESC LIMIT 1

Database: authors
Question: Provide any four valid Journal ID along with short name and full name of the papers which were made in 2013.
Evidence: valid journal ID refers to JournalId! = 0 and JournalId! = -1; made in 2013 refers to Year = 2013
SQL: SELECT DISTINCT T2.JournalId, T1.ShortName, T1.FullName FROM Journal AS T1 INNER JOIN Paper AS T2 ON T1.Id = T2.JournalId WHERE T2.Year = 2013 AND T2.JournalId != 0 AND T2.JournalId != -1 LIMIT 4

Database: chicago_crime
Question: The ward represented by which alderman had more incidents in January, 2018, Pat Dowell or Sophia King?
Evidence: January, 2018 refers to Substr(date, 1, 1) = '1' AND Substr(date, 5, 4) = '2018'; had more incidents refers to Max(Count(ward_no))
SQL: SELECT T1.alderman_first_name, T1.alderman_last_name, COUNT(T1.ward_no) AS num FROM Ward AS T1 INNER JOIN Crime AS T2 ON T1.ward_no = T2.ward_no WHERE (SUBSTR(T2.date, 1, 1) = '1' AND SUBSTR(T2.date, 5, 4) = '2018' AND T1.alderman_first_name = 'Pat' AND T1.alderman_last_name = 'Dowell') OR (T1.alderman_first_name = 'Sophia' AND T1.alderman_last_name = 'King') GROUP BY T1.ward_no

Database: cs_semester
Question: Describe the names and capability of the students who were advised by professors from the University of Washington.
Evidence: names of the students = f_name, l_name;
SQL: SELECT T3.f_name, T3.l_name, T2.capability FROM prof AS T1 INNER JOIN RA AS T2 ON T1.prof_id = T2.prof_id INNER JOIN student AS T3 ON T2.student_id = T3.student_id WHERE T1.graduate_from = 'University of Washington'

Database: regional_sales
Question: Which order have the highest unit cost?
Evidence: order have the highest unit cost refers to OrderNumber where MAX(Unit Cost);
SQL: SELECT OrderNumber FROM `Sales Orders` WHERE REPLACE(`Unit Cost`, ',', '') = ( SELECT REPLACE(`Unit Cost`, ',', '') FROM `Sales Orders` ORDER BY REPLACE(`Unit Cost`, ',', '') DESC LIMIT 1 )

Database: retails
Question: How many customers belong to the household segment in Germany?
Evidence: household segment refers to c_mktsegment = 'household'; Germany refers to n_name = 'Germany'
SQL: SELECT COUNT(T1.c_name) FROM customer AS T1 INNER JOIN nation AS T2 ON T1.c_nationkey = T2.n_nationkey WHERE T1.c_mktsegment = 'HOUSEHOLD' AND T2.n_name = 'GERMANY'

Database: world_development_indicators
Question: What was the deposit interest rate in the Commonwealth of Australia in 1979 in percentage?
Evidence: deposit interest rate refers to value where IndicatorName = 'Deposit interest rate (%)'; in the Commonwealth of Australia refers to  LongName = 'Commonwealth of Australia'; in 1979 refers to Year = '1979'
SQL: SELECT T1.Value FROM Indicators AS T1 INNER JOIN Country AS T2 ON T1.CountryCode = T2.CountryCode WHERE T2.LongName = 'Commonwealth of Australia' AND T1.IndicatorName = 'Deposit interest rate (%)' AND T1.Year = 1979

Database: address
Question: What is the name and the position of the CBSA officer in the city of Cabo Rojo?
Evidence: name of the CBSA officer refers to CBSA_name; position of the CBSA officer refers to CBSA_type;
SQL: SELECT T1.CBSA_name, T1.CBSA_type FROM CBSA AS T1 INNER JOIN zip_data AS T2 ON T1.CBSA = T2.CBSA WHERE T2.city = 'Cabo Rojo' GROUP BY T1.CBSA_name, T1.CBSA_type

Database: legislator
Question: What is the average number of terms served for a current legislator that's famous or impact?
Evidence: average = DIVIDE(COUNT(bioguide), COUNT(bioguide_id)); legislator that's famous or impact refers to wikipedia_id is not null;
SQL: SELECT CAST(COUNT(T2.bioguide) AS REAL) / COUNT(DISTINCT T1.bioguide_id) FROM current AS T1 INNER JOIN `current-terms` AS T2 ON T1.bioguide_id = T2.bioguide WHERE T1.wikipedia_id IS NOT NULL