1sf/bird-sql-train-with-schema huggingface dataset:
Database: food_inspection_2
Tables: employee, establishment, inspection, inspection_point, violation
Columns (table index, column name): -1, *, 0, employee_id, 0, first_name, 0, last_name, 0, address, 0, city, 0, state, 0, zip, 0, phone, 0, title, 0, salary, 0, supervisor, 1, license_no, 1, dba_name, 1, aka_name, 1, facility_type, 1, risk_level, 1, address, 1, city, 1, state, 1, zip, 1, latitude, 1, longitude, 1, ward, 2, inspection_id, 2, inspection_date, 2, inspection_type, 2, results, 2, employee_id, 2, license_no, 2, followup_to, 3, point_id, 3, Description, 3, category, 3, code, 3, fine, 3, point_level, 4, inspection_id, 4, point_id, 4, fine, 4, inspector_comment
Question: Provide the facility type and license number of establishments with the lowest risk level but failed the inspection.
Evidence: license number refers to license_no; the lowest risk level refers to min(risk_level); failed the inspection refers to results = 'Fail'
SQL: SELECT DISTINCT T1.facility_type, T1.license_no FROM establishment AS T1 INNER JOIN inspection AS T2 ON T1.license_no = T2.license_no WHERE T1.risk_level = 1 AND T2.results = 'Fail'
Database: food_inspection_2
Tables: employee, establishment, inspection, inspection_point, violation
Columns (table index, column name): -1, *, 0, employee_id, 0, first_name, 0, last_name, 0, address, 0, city, 0, state, 0, zip, 0, phone, 0, title, 0, salary, 0, supervisor, 1, license_no, 1, dba_name, 1, aka_name, 1, facility_type, 1, risk_level, 1, address, 1, city, 1, state, 1, zip, 1, latitude, 1, longitude, 1, ward, 2, inspection_id, 2, inspection_date, 2, inspection_type, 2, results, 2, employee_id, 2, license_no, 2, followup_to, 3, point_id, 3, Description, 3, category, 3, code, 3, fine, 3, point_level, 4, inspection_id, 4, point_id, 4, fine, 4, inspector_comment
Question: What is the result of the February 24, 2010 inspection involving the employee named "Arnold Holder"?
Evidence: February 24, 2010 refers to inspection_date = '2010-02-24'
SQL: SELECT DISTINCT T2.results FROM employee AS T1 INNER JOIN inspection AS T2 ON T1.employee_id = T2.employee_id WHERE T2.inspection_date = '2010-02-24' AND T1.first_name = 'Arnold' AND T1.last_name = 'Holder'
Database: food_inspection_2
Tables: employee, establishment, inspection, inspection_point, violation
Columns (table index, column name): -1, *, 0, employee_id, 0, first_name, 0, last_name, 0, address, 0, city, 0, state, 0, zip, 0, phone, 0, title, 0, salary, 0, supervisor, 1, license_no, 1, dba_name, 1, aka_name, 1, facility_type, 1, risk_level, 1, address, 1, city, 1, state, 1, zip, 1, latitude, 1, longitude, 1, ward, 2, inspection_id, 2, inspection_date, 2, inspection_type, 2, results, 2, employee_id, 2, license_no, 2, followup_to, 3, point_id, 3, Description, 3, category, 3, code, 3, fine, 3, point_level, 4, inspection_id, 4, point_id, 4, fine, 4, inspector_comment
Question: How many restaurants failed the inspection in April 2010?
Evidence: restaurant refers to facility_type = 'Restaurant'; failed the inspection refers to results = 'Fail'; in April 2010 refers to inspection_date like '2010-04%'
SQL: SELECT COUNT(DISTINCT T1.license_no) FROM establishment AS T1 INNER JOIN inspection AS T2 ON T1.license_no = T2.license_no WHERE strftime('%Y-%m', T2.inspection_date) = '2010-04' AND T1.facility_type = 'Restaurant' AND T2.results = 'Fail'
Database: food_inspection_2
Tables: employee, establishment, inspection, inspection_point, violation
Columns (table index, column name): -1, *, 0, employee_id, 0, first_name, 0, last_name, 0, address, 0, city, 0, state, 0, zip, 0, phone, 0, title, 0, salary, 0, supervisor, 1, license_no, 1, dba_name, 1, aka_name, 1, facility_type, 1, risk_level, 1, address, 1, city, 1, state, 1, zip, 1, latitude, 1, longitude, 1, ward, 2, inspection_id, 2, inspection_date, 2, inspection_type, 2, results, 2, employee_id, 2, license_no, 2, followup_to, 3, point_id, 3, Description, 3, category, 3, code, 3, fine, 3, point_level, 4, inspection_id, 4, point_id, 4, fine, 4, inspector_comment
Question: List all inspection IDs where the employee named "Rosemary Kennedy" was involved.
SQL: SELECT DISTINCT T2.inspection_id FROM employee AS T1 INNER JOIN inspection AS T2 ON T1.employee_id = T2.employee_id WHERE T1.first_name = 'Rosemary' AND T1.last_name = 'Kennedy'
Database: food_inspection_2
Tables: employee, establishment, inspection, inspection_point, violation
Columns (table index, column name): -1, *, 0, employee_id, 0, first_name, 0, last_name, 0, address, 0, city, 0, state, 0, zip, 0, phone, 0, title, 0, salary, 0, supervisor, 1, license_no, 1, dba_name, 1, aka_name, 1, facility_type, 1, risk_level, 1, address, 1, city, 1, state, 1, zip, 1, latitude, 1, longitude, 1, ward, 2, inspection_id, 2, inspection_date, 2, inspection_type, 2, results, 2, employee_id, 2, license_no, 2, followup_to, 3, point_id, 3, Description, 3, category, 3, code, 3, fine, 3, point_level, 4, inspection_id, 4, point_id, 4, fine, 4, inspector_comment
Question: What type of inspection was done on July 07, 2010, involving the employee named "Lisa Tillman"?
Evidence: type of inspection refers to inspection_type; on July 07, 2010 refers to inspection_date = '2010-07-07'
SQL: SELECT DISTINCT T2.inspection_type FROM employee AS T1 INNER JOIN inspection AS T2 ON T1.employee_id = T2.employee_id WHERE T1.first_name = 'Lisa' AND T1.last_name = 'Tillman' AND T2.inspection_date = '2010-07-07'
Database: food_inspection_2
Tables: employee, establishment, inspection, inspection_point, violation
Columns (table index, column name): -1, *, 0, employee_id, 0, first_name, 0, last_name, 0, address, 0, city, 0, state, 0, zip, 0, phone, 0, title, 0, salary, 0, supervisor, 1, license_no, 1, dba_name, 1, aka_name, 1, facility_type, 1, risk_level, 1, address, 1, city, 1, state, 1, zip, 1, latitude, 1, longitude, 1, ward, 2, inspection_id, 2, inspection_date, 2, inspection_type, 2, results, 2, employee_id, 2, license_no, 2, followup_to, 3, point_id, 3, Description, 3, category, 3, code, 3, fine, 3, point_level, 4, inspection_id, 4, point_id, 4, fine, 4, inspector_comment
Question: Provide the inspection ID of the inspection with the comment "MUST CLEAN AND BETTER ORGANIZE HALLWAY AREA" and sanitary operating requirement code of 7-38-030, 015, 010 (A), 005 (A).
Evidence: comment "MUST CLEAN AND BETTER ORGANIZE HALLWAY AREA" refers to inspector_comment = 'MUST CLEAN AND BETTER ORGANIZE HALLWAY AREA'; sanitary operating requirement code of 7-38-030, 015, 010 (A), 005 (A) refers to code = '7-38-030, 015, 010 (A), 005 (A)'
SQL: SELECT T2.inspection_id FROM inspection_point AS T1 INNER JOIN violation AS T2 ON T1.point_id = T2.point_id WHERE T2.inspector_comment = 'MUST CLEAN AND BETTER ORGANIZE HALLWAY AREA' AND T1.code = '7-38-030, 015, 010 (A), 005 (A)'
Database: food_inspection_2
Tables: employee, establishment, inspection, inspection_point, violation
Columns (table index, column name): -1, *, 0, employee_id, 0, first_name, 0, last_name, 0, address, 0, city, 0, state, 0, zip, 0, phone, 0, title, 0, salary, 0, supervisor, 1, license_no, 1, dba_name, 1, aka_name, 1, facility_type, 1, risk_level, 1, address, 1, city, 1, state, 1, zip, 1, latitude, 1, longitude, 1, ward, 2, inspection_id, 2, inspection_date, 2, inspection_type, 2, results, 2, employee_id, 2, license_no, 2, followup_to, 3, point_id, 3, Description, 3, category, 3, code, 3, fine, 3, point_level, 4, inspection_id, 4, point_id, 4, fine, 4, inspector_comment
Question: List down the names of the establishments with the highest risk level and failed the inspection.
Evidence: name of establishment refers to dba_name; the highest risk level refers to max(risk_level); failed the inspection refers to results = 'Fail'
SQL: SELECT DISTINCT T1.dba_name FROM establishment AS T1 INNER JOIN inspection AS T2 ON T1.license_no = T2.license_no WHERE T1.risk_level = 3 AND T2.results = 'Fail'
Database: food_inspection_2
Tables: employee, establishment, inspection, inspection_point, violation
Columns (table index, column name): -1, *, 0, employee_id, 0, first_name, 0, last_name, 0, address, 0, city, 0, state, 0, zip, 0, phone, 0, title, 0, salary, 0, supervisor, 1, license_no, 1, dba_name, 1, aka_name, 1, facility_type, 1, risk_level, 1, address, 1, city, 1, state, 1, zip, 1, latitude, 1, longitude, 1, ward, 2, inspection_id, 2, inspection_date, 2, inspection_type, 2, results, 2, employee_id, 2, license_no, 2, followup_to, 3, point_id, 3, Description, 3, category, 3, code, 3, fine, 3, point_level, 4, inspection_id, 4, point_id, 4, fine, 4, inspector_comment
Question: What is the inspection ID where the employee named "David Hodges" is currently employed in the "Kamayan Express" establishment?
Evidence: the "Kamayan Express" establishment refers to dba_name = 'KAMAYAN EXPRESS'
SQL: SELECT T2.inspection_id FROM establishment AS T1 INNER JOIN inspection AS T2 ON T1.license_no = T2.license_no INNER JOIN employee AS T3 ON T2.employee_id = T3.employee_id WHERE T3.first_name = 'David' AND T3.last_name = 'Hodges' AND T1.dba_name = 'KAMAYAN EXPRESS'
Database: food_inspection_2
Tables: employee, establishment, inspection, inspection_point, violation
Columns (table index, column name): -1, *, 0, employee_id, 0, first_name, 0, last_name, 0, address, 0, city, 0, state, 0, zip, 0, phone, 0, title, 0, salary, 0, supervisor, 1, license_no, 1, dba_name, 1, aka_name, 1, facility_type, 1, risk_level, 1, address, 1, city, 1, state, 1, zip, 1, latitude, 1, longitude, 1, ward, 2, inspection_id, 2, inspection_date, 2, inspection_type, 2, results, 2, employee_id, 2, license_no, 2, followup_to, 3, point_id, 3, Description, 3, category, 3, code, 3, fine, 3, point_level, 4, inspection_id, 4, point_id, 4, fine, 4, inspector_comment
Question: Provide the salary range of the employee involved in the inspection ID 58424.
SQL: SELECT T1.salary, T3.salary FROM employee AS T1 INNER JOIN inspection AS T2 ON T1.employee_id = T2.employee_id INNER JOIN employee AS T3 WHERE T2.inspection_id = 58424 ORDER BY T1.salary, T3.salary DESC LIMIT 1
Database: food_inspection_2
Tables: employee, establishment, inspection, inspection_point, violation
Columns (table index, column name): -1, *, 0, employee_id, 0, first_name, 0, last_name, 0, address, 0, city, 0, state, 0, zip, 0, phone, 0, title, 0, salary, 0, supervisor, 1, license_no, 1, dba_name, 1, aka_name, 1, facility_type, 1, risk_level, 1, address, 1, city, 1, state, 1, zip, 1, latitude, 1, longitude, 1, ward, 2, inspection_id, 2, inspection_date, 2, inspection_type, 2, results, 2, employee_id, 2, license_no, 2, followup_to, 3, point_id, 3, Description, 3, category, 3, code, 3, fine, 3, point_level, 4, inspection_id, 4, point_id, 4, fine, 4, inspector_comment
Question: List down the inspection ID with the inspector's comment "A certified food service manager must be present in all establishments at which potentially hazardous food is prepared or served. NO CERTIFIED FOOD MANAGER ON DUTY AT THIS TIME FOODS ARE COOKED AND SERVED SERIOUS CITATION ISSUED" and inspection category of Personnel.
Evidence: inspector's comment "A certified food service manager must be present in all establishments at which potentially hazardous food is prepared or served. NO CERTIFIED FOOD MANAGER ON DUTY AT THIS TIME FOODS ARE COOKED AND SERVED SERIOUS CITATION ISSUED" refers to inspector_comment = 'A certified food service manager must be present in all establishments at which potentially hazardous food is prepared or served.FOUND NO CITY OF CHICAGO SANITATION CERTIFICATE POSTED OR VALID DOCUMENTATION DURING THIS INSPECTION.'; inspection category of Personnel refers to category = 'Personnel'
SQL: SELECT T2.inspection_id FROM inspection_point AS T1 INNER JOIN violation AS T2 ON T1.point_id = T2.point_id WHERE T1.category = 'Personnel' AND T2.inspector_comment = 'A certified food service manager must be present in all establishments at which potentially hazardous food is prepared or served.FOUND NO CITY OF CHICAGO SANITATION CERTIFICATE POSTED OR VALID DOCUMENTATION DURING THIS INSPECTION.'
Database: food_inspection_2
Tables: employee, establishment, inspection, inspection_point, violation
Columns (table index, column name): -1, *, 0, employee_id, 0, first_name, 0, last_name, 0, address, 0, city, 0, state, 0, zip, 0, phone, 0, title, 0, salary, 0, supervisor, 1, license_no, 1, dba_name, 1, aka_name, 1, facility_type, 1, risk_level, 1, address, 1, city, 1, state, 1, zip, 1, latitude, 1, longitude, 1, ward, 2, inspection_id, 2, inspection_date, 2, inspection_type, 2, results, 2, employee_id, 2, license_no, 2, followup_to, 3, point_id, 3, Description, 3, category, 3, code, 3, fine, 3, point_level, 4, inspection_id, 4, point_id, 4, fine, 4, inspector_comment
Question: How many grocery stores paid $250 fine upon their inspection?
Evidence: grocery store refers to facility_type = 'Grocery Store'; $250 fine refers to fine = 250
SQL: SELECT COUNT(DISTINCT T1.license_no) FROM establishment AS T1 INNER JOIN inspection AS T2 ON T1.license_no = T2.license_no INNER JOIN violation AS T3 ON T2.inspection_id = T3.inspection_id WHERE T1.facility_type = 'Grocery Store' AND T3.fine = 250
Database: food_inspection_2
Tables: employee, establishment, inspection, inspection_point, violation
Columns (table index, column name): -1, *, 0, employee_id, 0, first_name, 0, last_name, 0, address, 0, city, 0, state, 0, zip, 0, phone, 0, title, 0, salary, 0, supervisor, 1, license_no, 1, dba_name, 1, aka_name, 1, facility_type, 1, risk_level, 1, address, 1, city, 1, state, 1, zip, 1, latitude, 1, longitude, 1, ward, 2, inspection_id, 2, inspection_date, 2, inspection_type, 2, results, 2, employee_id, 2, license_no, 2, followup_to, 3, point_id, 3, Description, 3, category, 3, code, 3, fine, 3, point_level, 4, inspection_id, 4, point_id, 4, fine, 4, inspector_comment
Question: What is the category of the inspection of the establishment named "J & J FOOD"?
Evidence: the establishment named "J & J FOOD" refers to dba_name = 'J & J FOOD'
SQL: SELECT DISTINCT T4.category FROM establishment AS T1 INNER JOIN inspection AS T2 ON T1.license_no = T2.license_no INNER JOIN violation AS T3 ON T2.inspection_id = T3.inspection_id INNER JOIN inspection_point AS T4 ON T3.point_id = T4.point_id WHERE T1.dba_name = 'J & J FOOD'
Database: food_inspection_2
Tables: employee, establishment, inspection, inspection_point, violation
Columns (table index, column name): -1, *, 0, employee_id, 0, first_name, 0, last_name, 0, address, 0, city, 0, state, 0, zip, 0, phone, 0, title, 0, salary, 0, supervisor, 1, license_no, 1, dba_name, 1, aka_name, 1, facility_type, 1, risk_level, 1, address, 1, city, 1, state, 1, zip, 1, latitude, 1, longitude, 1, ward, 2, inspection_id, 2, inspection_date, 2, inspection_type, 2, results, 2, employee_id, 2, license_no, 2, followup_to, 3, point_id, 3, Description, 3, category, 3, code, 3, fine, 3, point_level, 4, inspection_id, 4, point_id, 4, fine, 4, inspector_comment
Question: Name the taverns that failed the inspection in January 2010.
Evidence: tavern refers to facility_type = 'Tavern'; failed the inspection refers to results = 'Fail'; in January 2010 refers to inspection_date like '2010-01%'
SQL: SELECT DISTINCT T1.dba_name FROM establishment AS T1 INNER JOIN inspection AS T2 ON T1.license_no = T2.license_no INNER JOIN violation AS T3 ON T2.inspection_id = T3.inspection_id WHERE strftime('%Y-%m', T2.inspection_date) = '2010-01' AND T2.results = 'Fail' AND T1.facility_type = 'TAVERN'
Database: food_inspection_2
Tables: employee, establishment, inspection, inspection_point, violation
Columns (table index, column name): -1, *, 0, employee_id, 0, first_name, 0, last_name, 0, address, 0, city, 0, state, 0, zip, 0, phone, 0, title, 0, salary, 0, supervisor, 1, license_no, 1, dba_name, 1, aka_name, 1, facility_type, 1, risk_level, 1, address, 1, city, 1, state, 1, zip, 1, latitude, 1, longitude, 1, ward, 2, inspection_id, 2, inspection_date, 2, inspection_type, 2, results, 2, employee_id, 2, license_no, 2, followup_to, 3, point_id, 3, Description, 3, category, 3, code, 3, fine, 3, point_level, 4, inspection_id, 4, point_id, 4, fine, 4, inspector_comment
Question: How many of the inspections with serious point levels have no fines?
Evidence: serious point level refers to point_level = 'Serious'; no fines refers to fine = 0
SQL: SELECT COUNT(DISTINCT T2.inspection_id) FROM inspection_point AS T1 INNER JOIN violation AS T2 ON T1.point_id = T2.point_id WHERE T1.point_level = 'Serious ' AND T2.fine = 0
Database: food_inspection_2
Tables: employee, establishment, inspection, inspection_point, violation
Columns (table index, column name): -1, *, 0, employee_id, 0, first_name, 0, last_name, 0, address, 0, city, 0, state, 0, zip, 0, phone, 0, title, 0, salary, 0, supervisor, 1, license_no, 1, dba_name, 1, aka_name, 1, facility_type, 1, risk_level, 1, address, 1, city, 1, state, 1, zip, 1, latitude, 1, longitude, 1, ward, 2, inspection_id, 2, inspection_date, 2, inspection_type, 2, results, 2, employee_id, 2, license_no, 2, followup_to, 3, point_id, 3, Description, 3, category, 3, code, 3, fine, 3, point_level, 4, inspection_id, 4, point_id, 4, fine, 4, inspector_comment
Question: What is the establishment's name with an inspection category of No Smoking Regulations?
Evidence: establishment's name refers to dba_name; an inspection category of No Smoking Regulations refers to category = 'No Smoking Regulations'
SQL: SELECT DISTINCT T1.dba_name FROM establishment AS T1 INNER JOIN inspection AS T2 ON T1.license_no = T2.license_no INNER JOIN violation AS T3 ON T2.inspection_id = T3.inspection_id INNER JOIN inspection_point AS T4 ON T3.point_id = T4.point_id WHERE T4.category = 'No Smoking Regulations'
Database: food_inspection_2
Tables: employee, establishment, inspection, inspection_point, violation
Columns (table index, column name): -1, *, 0, employee_id, 0, first_name, 0, last_name, 0, address, 0, city, 0, state, 0, zip, 0, phone, 0, title, 0, salary, 0, supervisor, 1, license_no, 1, dba_name, 1, aka_name, 1, facility_type, 1, risk_level, 1, address, 1, city, 1, state, 1, zip, 1, latitude, 1, longitude, 1, ward, 2, inspection_id, 2, inspection_date, 2, inspection_type, 2, results, 2, employee_id, 2, license_no, 2, followup_to, 3, point_id, 3, Description, 3, category, 3, code, 3, fine, 3, point_level, 4, inspection_id, 4, point_id, 4, fine, 4, inspector_comment
Question: What is the difference in the number of restaurants that passed and failed the canvass inspection type?
Evidence: canvass inspection type refers to inspection_type = 'Canvass'; restaurant refers to facility_type = 'Restaurant'; difference = subtract(count(inspection_id where results = 'Pass'), count(inspection_id where results = 'Fail'))
SQL: SELECT COUNT(CASE WHEN T2.results = 'Pass' THEN T1.license_no END) - COUNT(CASE WHEN T2.results = 'Fail' THEN T1.license_no END) AS diff FROM establishment AS T1 INNER JOIN inspection AS T2 ON T1.license_no = T2.license_no WHERE T2.inspection_type = 'Canvass' AND T1.facility_type = 'Restaurant'
Database: food_inspection_2
Tables: employee, establishment, inspection, inspection_point, violation
Columns (table index, column name): -1, *, 0, employee_id, 0, first_name, 0, last_name, 0, address, 0, city, 0, state, 0, zip, 0, phone, 0, title, 0, salary, 0, supervisor, 1, license_no, 1, dba_name, 1, aka_name, 1, facility_type, 1, risk_level, 1, address, 1, city, 1, state, 1, zip, 1, latitude, 1, longitude, 1, ward, 2, inspection_id, 2, inspection_date, 2, inspection_type, 2, results, 2, employee_id, 2, license_no, 2, followup_to, 3, point_id, 3, Description, 3, category, 3, code, 3, fine, 3, point_level, 4, inspection_id, 4, point_id, 4, fine, 4, inspector_comment
Question: Among the establishments that failed the inspection in February 2010, list the names of the employees with a salary greater than 70% of the average salary of all employees.
Evidence: failed the inspection refers to results = 'Fail'; in January 2010 refers to inspection_date like '2010-01%'; name of employee refers to first_name, last_name; a salary greater than 70% of the average salary refers to salary > multiply(avg(salary), 0.7)
SQL: SELECT DISTINCT T1.employee_id FROM employee AS T1 INNER JOIN inspection AS T2 ON T1.employee_id = T2.employee_id WHERE T2.results = 'Fail' AND strftime('%Y-%m', T2.inspection_date) = '2010-02' AND T1.salary > 0.7 * ( SELECT AVG(salary) FROM employee )
Database: food_inspection_2
Tables: employee, establishment, inspection, inspection_point, violation
Columns (table index, column name): -1, *, 0, employee_id, 0, first_name, 0, last_name, 0, address, 0, city, 0, state, 0, zip, 0, phone, 0, title, 0, salary, 0, supervisor, 1, license_no, 1, dba_name, 1, aka_name, 1, facility_type, 1, risk_level, 1, address, 1, city, 1, state, 1, zip, 1, latitude, 1, longitude, 1, ward, 2, inspection_id, 2, inspection_date, 2, inspection_type, 2, results, 2, employee_id, 2, license_no, 2, followup_to, 3, point_id, 3, Description, 3, category, 3, code, 3, fine, 3, point_level, 4, inspection_id, 4, point_id, 4, fine, 4, inspector_comment
Question: Among the establishments that paid a 500 fine, what is the percentage of restaurants?
Evidence: a 500 fine refers to fine = 500; restaurant refers to facility_type = 'Restaurant'; percentage = divide(count(license_no where facility_type = 'Restaurant'), count(license_no)) * 100% where fine = 500
SQL: SELECT CAST(COUNT(CASE WHEN T1.facility_type = 'Restaurant' THEN T1.license_no END) AS REAL) * 100 / COUNT(T1.facility_type) FROM establishment AS T1 INNER JOIN inspection AS T2 ON T1.license_no = T2.license_no INNER JOIN violation AS T3 ON T2.inspection_id = T3.inspection_id WHERE T3.fine = 500
Database: coinmarketcap
Tables: coins, historical
Columns (table index, column name): -1, *, 0, id, 0, name, 0, slug, 0, symbol, 0, status, 0, category, 0, description, 0, subreddit, 0, notice, 0, tags, 0, tag_names, 0, website, 0, platform_id, 0, date_added, 0, date_launched, 1, date, 1, coin_id, 1, cmc_rank, 1, market_cap, 1, price, 1, open, 1, high, 1, low, 1, close, 1, time_high, 1, time_low, 1, volume_24h, 1, percent_change_1h, 1, percent_change_24h, 1, percent_change_7d, 1, circulating_supply, 1, total_supply, 1, max_supply, 1, num_market_pairs
Question: Name the coin that has the highest market capitalization for all transactions in 2018.
Evidence: highest market capitalization refers to max(market_cap); in 2018 refers to year(date) = 2018
SQL: SELECT T1.name FROM coins AS T1 INNER JOIN historical AS T2 ON T1.id = T2.coin_id WHERE T2.date LIKE '2018%' AND T2.market_cap = ( SELECT MAX(market_cap) FROM historical WHERE STRFTIME('%Y', date) = '2018' )
Database: coinmarketcap
Tables: coins, historical
Columns (table index, column name): -1, *, 0, id, 0, name, 0, slug, 0, symbol, 0, status, 0, category, 0, description, 0, subreddit, 0, notice, 0, tags, 0, tag_names, 0, website, 0, platform_id, 0, date_added, 0, date_launched, 1, date, 1, coin_id, 1, cmc_rank, 1, market_cap, 1, price, 1, open, 1, high, 1, low, 1, close, 1, time_high, 1, time_low, 1, volume_24h, 1, percent_change_1h, 1, percent_change_24h, 1, percent_change_7d, 1, circulating_supply, 1, total_supply, 1, max_supply, 1, num_market_pairs
Question: What is the total value of Argentum coined traded in the past 24 hours on 2016/10/11.
Evidence: total value in the past 24 hours refers to volume_24h; on 11/10/16 refers to date = '2016-11-10'
SQL: SELECT T2.volume_24h FROM coins AS T1 INNER JOIN historical AS T2 ON T1.id = T2.coin_id WHERE T1.name = 'Argentum' AND T2.date = '2016-10-11'