db_id stringlengths 4 31 | SQL stringlengths 18 1.45k | input_sequence stringlengths 148 11k | question stringlengths 16 325 |
|---|---|---|---|
food_inspection_2 | select t1.dba_name from establishment as t1 inner join inspection as t2 on t1.license_no = t2.license_no where t2.inspection_type = 'license' | Question: list down the dba name of restaurants that were inspected due to license. | Tables: employee -> employee_id, first_name, last_name, address, city, state, zip, phone, title, salary, supervisor. establishment -> license_no, dba_name, aka_name, facility_type, risk_level, address, city, state, zip, latitude, long... | list down the dba name of restaurants that were inspected due to license. |
food_inspection_2 | select count(t2.inspection_id) from establishment as t1 inner join inspection as t2 on t1.license_no = t2.license_no where strftime('%y', t2.inspection_date) = '2010' and t1.risk_level = 3 | Question: how many inspections done in 2010 had serious food safety issue? | Tables: employee -> employee_id, first_name, last_name, address, city, state, zip, phone, title, salary, supervisor. establishment -> license_no, dba_name, aka_name, facility_type, risk_level, address, city, state, zip, latitude, longitude, wa... | how many inspections done in 2010 had serious food safety issue? |
food_inspection_2 | select distinct t1.dba_name from establishment as t1 inner join inspection as t2 on t1.license_no = t2.license_no where t2.results like '%pass%' | Question: state the name of dbas with verified quality. | Tables: employee -> employee_id, first_name, last_name, address, city, state, zip, phone, title, salary, supervisor. establishment -> license_no, dba_name, aka_name, facility_type, risk_level, address, city, state, zip, latitude, longitude, ward. inspection -> i... | state the name of dbas with verified quality. |
food_inspection_2 | select sum(t2.salary) from inspection as t1 inner join employee as t2 on t1.employee_id = t2.employee_id where t1.inspection_id between 52270 and 52272 | Question: calculate the total salary for employees who did inspection from id 52270 to 52272. | Tables: employee -> employee_id, first_name, last_name, address, city, state, zip, phone, title, salary, supervisor. establishment -> license_no, dba_name, aka_name, facility_type, risk_level, address, city, state, zip, lati... | calculate the total salary for employees who did inspection from id 52270 to 52272. |
food_inspection_2 | select avg(t2.salary) from inspection as t1 inner join employee as t2 on t1.employee_id = t2.employee_id where t1.inspection_type = 'license re-inspection' | Question: calculate the average salary for employees who did inspection on license re-inspection. | Tables: employee -> employee_id, first_name, last_name, address, city, state, zip, phone, title, salary, supervisor. establishment -> license_no, dba_name, aka_name, facility_type, risk_level, address, city, state, zip, ... | calculate the average salary for employees who did inspection on license re-inspection. |
food_inspection_2 | select distinct t2.results, t1.zip from establishment as t1 inner join inspection as t2 on t1.license_no = t2.license_no where t1.license_no = 1222441 | Question: did license number 1222441 pass the inspection and what is the zip code number of it? | Tables: employee -> employee_id, first_name, last_name, address, city, state, zip, phone, title, salary, supervisor. establishment -> license_no, dba_name, aka_name, facility_type, risk_level, address, city, state, zip, la... | did license number 1222441 pass the inspection and what is the zip code number of it? |
food_inspection_2 | select min(t2.inspection_date) from establishment as t1 inner join inspection as t2 on t1.license_no = t2.license_no where t1.dba_name = 'john schaller' and strftime('%y', t2.inspection_date) = '2010' | Question: when did restaurant john schaller has its first inspection in 2010? | Tables: employee -> employee_id, first_name, last_name, address, city, state, zip, phone, title, salary, supervisor. establishment -> license_no, dba_name, aka_name, facility_type, risk_level, address, city, state, zip, latitude, longitude,... | when did restaurant john schaller has its first inspection in 2010? |
food_inspection_2 | select distinct t1.first_name, t1.last_name from employee as t1 inner join inspection as t2 on t1.employee_id = t2.employee_id where t2.license_no = 1334073 | Question: what is the full name of the employee that inspected establishments with license 1334073? | Tables: employee -> employee_id, first_name, last_name, address, city, state, zip, phone, title, salary, supervisor. establishment -> license_no, dba_name, aka_name, facility_type, risk_level, address, city, state, zip... | what is the full name of the employee that inspected establishments with license 1334073? |
food_inspection_2 | select distinct t3.dba_name from employee as t1 inner join inspection as t2 on t1.employee_id = t2.employee_id inner join establishment as t3 on t2.license_no = t3.license_no where t1.first_name = 'joshua' and t1.last_name = 'rosa' | Question: which establishments did joshua rosa inspect? | Tables: employee -> employee_id, first_name, last_name, address, city, state, zip, phone, title, salary, supervisor. establishment -> license_no, dba_name, aka_name, facility_type, risk_level, address, city, state, zip, latitude, longitude, ward. inspection -> i... | which establishments did joshua rosa inspect? |
food_inspection_2 | select count(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 t1.salary > 70000 | Question: how many employees have salary greater than 70000 but fail the inspection? | Tables: employee -> employee_id, first_name, last_name, address, city, state, zip, phone, title, salary, supervisor. establishment -> license_no, dba_name, aka_name, facility_type, risk_level, address, city, state, zip, latitude, lon... | how many employees have salary greater than 70000 but fail the inspection? |
food_inspection_2 | select distinct t1.dba_name from establishment as t1 inner join inspection as t2 on t1.license_no = t2.license_no where strftime('%y', t2.inspection_date) = '2010' and t2.results = 'pass' and t1.facility_type = 'liquor' | Question: name the food businesses that passed the inspection in 2010. | Tables: employee -> employee_id, first_name, last_name, address, city, state, zip, phone, title, salary, supervisor. establishment -> license_no, dba_name, aka_name, facility_type, risk_level, address, city, state, zip, latitude, longitude, ward. ... | name the food businesses that passed the inspection in 2010. |
food_inspection_2 | select distinct t3.dba_name from employee as t1 inner join inspection as t2 on t1.employee_id = t2.employee_id inner join establishment as t3 on t2.license_no = t3.license_no where t1.first_name = 'joshua' and t1.last_name = 'rosa' | Question: what is the name of the establishment that joshua rosa inspected? | Tables: employee -> employee_id, first_name, last_name, address, city, state, zip, phone, title, salary, supervisor. establishment -> license_no, dba_name, aka_name, facility_type, risk_level, address, city, state, zip, latitude, longitude, w... | what is the name of the establishment that joshua rosa inspected? |
food_inspection_2 | 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-07' and t2.results = 'fail' and t1.facility_type = 'restaurant' | Question: how many taverns failed in july 2010? | Tables: employee -> employee_id, first_name, last_name, address, city, state, zip, phone, title, salary, supervisor. establishment -> license_no, dba_name, aka_name, facility_type, risk_level, address, city, state, zip, latitude, longitude, ward. inspection -> inspectio... | how many taverns failed in july 2010? |
food_inspection_2 | select distinct t3.risk_level from employee as t1 inner join inspection as t2 on t1.employee_id = t2.employee_id inner join establishment as t3 on t2.license_no = t3.license_no where t1.first_name = 'bob' and t1.last_name = 'benson' | Question: what is the risk level of the establishment that bob benson inspected? | Tables: employee -> employee_id, first_name, last_name, address, city, state, zip, phone, title, salary, supervisor. establishment -> license_no, dba_name, aka_name, facility_type, risk_level, address, city, state, zip, latitude, longitu... | what is the risk level of the establishment that bob benson inspected? |
food_inspection_2 | select distinct t3.dba_name, t2.results from employee as t1 inner join inspection as t2 on t1.employee_id = t2.employee_id inner join establishment as t3 on t2.license_no = t3.license_no where t1.first_name = 'bob' and t1.last_name = 'benson' and strftime('%y', t2.inspection_date) = '2010' | Question: which establishments did bob benson inspect in 2010 and what was the results? | Tables: employee -> employee_id, first_name, last_name, address, city, state, zip, phone, title, salary, supervisor. establishment -> license_no, dba_name, aka_name, facility_type, risk_level, address, city, state, zip, latitude, ... | which establishments did bob benson inspect in 2010 and what was the results? |
food_inspection_2 | select distinct t1.title from employee as t1 inner join inspection as t2 on t1.employee_id = t2.employee_id where t2.license_no = 1576687 | Question: what is the title of the employee that inspected the establishment with license number 1576687? | Tables: employee -> employee_id, first_name, last_name, address, city, state, zip, phone, title, salary, supervisor. establishment -> license_no, dba_name, aka_name, facility_type, risk_level, address, city, stat... | what is the title of the employee that inspected the establishment with license number 1576687? |
food_inspection_2 | select count(distinct t2.point_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 | Question: how many inspection points with serious point level that have no fine? | Tables: employee -> employee_id, first_name, last_name, address, city, state, zip, phone, title, salary, supervisor. establishment -> license_no, dba_name, aka_name, facility_type, risk_level, address, city, state, zip, latitude, longitu... | how many inspection points with serious point level that have no fine? |
food_inspection_2 | select cast(count(case when t3.fine = 250 then t1.license_no end) as real) * 100 / count(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 = 'restaurant' | Question: what is the percentage of restaurants that paid a fine of 250 among all establishments? | Tables: employee -> employee_id, first_name, last_name, address, city, state, zip, phone, title, salary, supervisor. establishment -> license_no, dba_name, aka_name, facility_type, risk_level, address, city, state, zip, ... | what is the percentage of restaurants that paid a fine of 250 among all establishments? |
food_inspection_2 | select cast(count(case when t1.risk_level = 1 then t1.license_no end) as real) * 100 / count(t1.license_no) from establishment as t1 inner join inspection as t2 on t1.license_no = t2.license_no where t2.results = 'pass' | Question: what is the percentage of establishments with a risk level of 1 among all of the establishments that passed the inspection? | Tables: employee -> employee_id, first_name, last_name, address, city, state, zip, phone, title, salary, supervisor. establishment -> license_no, dba_name, aka_name, facility_type, ris... | what is the percentage of establishments with a risk level of 1 among all of the establishments that passed the inspection? |
food_inspection_2 | select address, city, state from employee where first_name = 'standard' and last_name = 'murray' | Question: where does the employee named 'standard murray' live? | Tables: employee -> employee_id, first_name, last_name, address, city, state, zip, phone, title, salary, supervisor. establishment -> license_no, dba_name, aka_name, facility_type, risk_level, address, city, state, zip, latitude, longitude, ward. inspect... | where does the employee named 'standard murray' live? |
food_inspection_2 | select facility_type from establishment where dba_name = 'kinetic playground' | Question: what is the facility type of the establishment named 'kinetic playground'? | Tables: employee -> employee_id, first_name, last_name, address, city, state, zip, phone, title, salary, supervisor. establishment -> license_no, dba_name, aka_name, facility_type, risk_level, address, city, state, zip, latitude, lon... | what is the facility type of the establishment named 'kinetic playground'? |
food_inspection_2 | select salary from employee where first_name = 'jessica' and last_name = 'anthony' | Question: how much salary does jessica anthony receive? | Tables: employee -> employee_id, first_name, last_name, address, city, state, zip, phone, title, salary, supervisor. establishment -> license_no, dba_name, aka_name, facility_type, risk_level, address, city, state, zip, latitude, longitude, ward. inspection -> i... | how much salary does jessica anthony receive? |
food_inspection_2 | select dba_name from establishment where latitude = 41.9532864854 and longitude = -87.7673790701422 and facility_type = 'restaurant' | Question: what is the restaurant's name at '41.9532864854' latitude and '-87.7673790701422' longitude? | Tables: employee -> employee_id, first_name, last_name, address, city, state, zip, phone, title, salary, supervisor. establishment -> license_no, dba_name, aka_name, facility_type, risk_level, address, city, state, ... | what is the restaurant's name at '41.9532864854' latitude and '-87.7673790701422' longitude? |
food_inspection_2 | select count(employee_id) from employee where title = 'supervisor' | Question: among the list of employees, what is the total number of supervisors? | Tables: employee -> employee_id, first_name, last_name, address, city, state, zip, phone, title, salary, supervisor. establishment -> license_no, dba_name, aka_name, facility_type, risk_level, address, city, state, zip, latitude, longitud... | among the list of employees, what is the total number of supervisors? |
food_inspection_2 | select address from establishment where city = 'chicago' and dba_name = 'old timers rest & lounge' and facility_type = 'restaurant' | Question: where in chicago does the restaurant named 'old timers rest & lounge' located? | Tables: employee -> employee_id, first_name, last_name, address, city, state, zip, phone, title, salary, supervisor. establishment -> license_no, dba_name, aka_name, facility_type, risk_level, address, city, state, zip, latitude,... | where in chicago does the restaurant named 'old timers rest & lounge' located? |
food_inspection_2 | select count(employee_id) from employee where state = 'il' and city = 'hoffman estates' | Question: how many employees are living in hoffman estates, il? | Tables: employee -> employee_id, first_name, last_name, address, city, state, zip, phone, title, salary, supervisor. establishment -> license_no, dba_name, aka_name, facility_type, risk_level, address, city, state, zip, latitude, longitude, ward. inspect... | how many employees are living in hoffman estates, il? |
food_inspection_2 | select count(license_no) from establishment where risk_level = 3 | Question: what is the total number of establishments with the highest risk level? | Tables: employee -> employee_id, first_name, last_name, address, city, state, zip, phone, title, salary, supervisor. establishment -> license_no, dba_name, aka_name, facility_type, risk_level, address, city, state, zip, latitude, longit... | what is the total number of establishments with the highest risk level? |
food_inspection_2 | select first_name, last_name from employee where salary = 82700 | Question: who is the employee that receives 82700 as their salary? | Tables: employee -> employee_id, first_name, last_name, address, city, state, zip, phone, title, salary, supervisor. establishment -> license_no, dba_name, aka_name, facility_type, risk_level, address, city, state, zip, latitude, longitude, ward. insp... | who is the employee that receives 82700 as their salary? |
food_inspection_2 | select distinct t1.last_name from employee as t1 inner join inspection as t2 on t1.employee_id = t2.employee_id where t2.inspection_id = 52256 | Question: provide the last name of the employee involved in the inspection id 52256. | Tables: employee -> employee_id, first_name, last_name, address, city, state, zip, phone, title, salary, supervisor. establishment -> license_no, dba_name, aka_name, facility_type, risk_level, address, city, state, zip, latitude, lon... | provide the last name of the employee involved in the inspection id 52256. |
food_inspection_2 | 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 t1.facility_type = 'tavern' and t3.fine = 100 | Question: please list the names of taverns that paid a $100 fine upon inspection. | Tables: employee -> employee_id, first_name, last_name, address, city, state, zip, phone, title, salary, supervisor. establishment -> license_no, dba_name, aka_name, facility_type, risk_level, address, city, state, zip, latitude, longit... | please list the names of taverns that paid a $100 fine upon inspection. |
food_inspection_2 | select distinct t1.point_level from inspection_point as t1 inner join violation as t2 on t1.point_id = t2.point_id where t2.fine = 0 | Question: list point level of inspections with no fine. | Tables: employee -> employee_id, first_name, last_name, address, city, state, zip, phone, title, salary, supervisor. establishment -> license_no, dba_name, aka_name, facility_type, risk_level, address, city, state, zip, latitude, longitude, ward. inspection -> i... | list point level of inspections with no fine. |
food_inspection_2 | 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' | Question: provide the facility type and license number of establishments with the lowest risk level but failed the inspection. | Tables: employee -> employee_id, first_name, last_name, address, city, state, zip, phone, title, salary, supervisor. establishment -> license_no, dba_name, aka_name, facility_type, risk_level... | provide the facility type and license number of establishments with the lowest risk level but failed the inspection. |
food_inspection_2 | 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' | Question: what is the result of the february 24, 2010 inspection involving the employee named 'arnold holder'? | Tables: employee -> employee_id, first_name, last_name, address, city, state, zip, phone, title, salary, supervisor. establishment -> license_no, dba_name, aka_name, facility_type, risk_level, address, city,... | what is the result of the february 24, 2010 inspection involving the employee named 'arnold holder'? |
food_inspection_2 | 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' | Question: how many restaurants failed the inspection in april 2010? | Tables: employee -> employee_id, first_name, last_name, address, city, state, zip, phone, title, salary, supervisor. establishment -> license_no, dba_name, aka_name, facility_type, risk_level, address, city, state, zip, latitude, longitude, ward. ins... | how many restaurants failed the inspection in april 2010? |
food_inspection_2 | 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' | Question: list all inspection ids where the employee named 'rosemary kennedy' was involved. | Tables: employee -> employee_id, first_name, last_name, address, city, state, zip, phone, title, salary, supervisor. establishment -> license_no, dba_name, aka_name, facility_type, risk_level, address, city, state, zip, latitu... | list all inspection ids where the employee named 'rosemary kennedy' was involved. |
food_inspection_2 | 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' | Question: what type of inspection was done on july 07, 2010, involving the employee named 'lisa tillman'? | Tables: employee -> employee_id, first_name, last_name, address, city, state, zip, phone, title, salary, supervisor. establishment -> license_no, dba_name, aka_name, facility_type, risk_level, address, city, stat... | what type of inspection was done on july 07, 2010, involving the employee named 'lisa tillman'? |
food_inspection_2 | 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)' | 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). | Tables: employee -> employee_id, first_name, last_name, address, city, state, zip, phone, title, salary, supervisor. establis... | 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). |
food_inspection_2 | 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' | Question: list down the names of the establishments with the highest risk level and failed the inspection. | Tables: employee -> employee_id, first_name, last_name, address, city, state, zip, phone, title, salary, supervisor. establishment -> license_no, dba_name, aka_name, facility_type, risk_level, address, city, sta... | list down the names of the establishments with the highest risk level and failed the inspection. |
food_inspection_2 | 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' | Question: what is the inspection id where the employee named 'david hodges' is currently employed in the 'kamayan express' establishment? | Tables: employee -> employee_id, first_name, last_name, address, city, state, zip, phone, title, salary, supervisor. establishment -> license_no, dba_name, aka_name, facility_type,... | what is the inspection id where the employee named 'david hodges' is currently employed in the 'kamayan express' establishment? |
food_inspection_2 | 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 | Question: provide the salary range of the employee involved in the inspection id 58424. | Tables: employee -> employee_id, first_name, last_name, address, city, state, zip, phone, title, salary, supervisor. establishment -> license_no, dba_name, aka_name, facility_type, risk_level, address, city, state, zip, latitude, ... | provide the salary range of the employee involved in the inspection id 58424. |
food_inspection_2 | 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 chicag... | 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 categor... | 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 perso... |
food_inspection_2 | 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 | Question: how many grocery stores paid $250 fine upon their inspection? | Tables: employee -> employee_id, first_name, last_name, address, city, state, zip, phone, title, salary, supervisor. establishment -> license_no, dba_name, aka_name, facility_type, risk_level, address, city, state, zip, latitude, longitude, ward.... | how many grocery stores paid $250 fine upon their inspection? |
food_inspection_2 | 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' | Question: what is the category of the inspection of the establishment named 'j & j food'? | Tables: employee -> employee_id, first_name, last_name, address, city, state, zip, phone, title, salary, supervisor. establishment -> license_no, dba_name, aka_name, facility_type, risk_level, address, city, state, zip, latitude... | what is the category of the inspection of the establishment named 'j & j food'? |
food_inspection_2 | 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' | Question: name the taverns that failed the inspection in january 2010. | Tables: employee -> employee_id, first_name, last_name, address, city, state, zip, phone, title, salary, supervisor. establishment -> license_no, dba_name, aka_name, facility_type, risk_level, address, city, state, zip, latitude, longitude, ward. ... | name the taverns that failed the inspection in january 2010. |
food_inspection_2 | 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 | Question: how many of the inspections with serious point levels have no fines? | Tables: employee -> employee_id, first_name, last_name, address, city, state, zip, phone, title, salary, supervisor. establishment -> license_no, dba_name, aka_name, facility_type, risk_level, address, city, state, zip, latitude, longitude... | how many of the inspections with serious point levels have no fines? |
food_inspection_2 | 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' | Question: what is the establishment's name with an inspection category of no smoking regulations? | Tables: employee -> employee_id, first_name, last_name, address, city, state, zip, phone, title, salary, supervisor. establishment -> license_no, dba_name, aka_name, facility_type, risk_level, address, city, state, zip, ... | what is the establishment's name with an inspection category of no smoking regulations? |
food_inspection_2 | 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' | Question: what is the difference in the number of restaurants that passed and failed the canvass inspection type? | Tables: employee -> employee_id, first_name, last_name, address, city, state, zip, phone, title, salary, supervisor. establishment -> license_no, dba_name, aka_name, facility_type, risk_level, address, ci... | what is the difference in the number of restaurants that passed and failed the canvass inspection type? |
food_inspection_2 | 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 ) | 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. | Tables: employee -> employee_id, first_name, last_name, address, city, state, zip, phone, title, salary, supervisor. establishment -> l... | 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. |
food_inspection_2 | 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 | Question: among the establishments that paid a 500 fine, what is the percentage of restaurants? | Tables: employee -> employee_id, first_name, last_name, address, city, state, zip, phone, title, salary, supervisor. establishment -> license_no, dba_name, aka_name, facility_type, risk_level, address, city, state, zip, la... | among the establishments that paid a 500 fine, what is the percentage of restaurants? |
coinmarketcap | 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' ) | Question: name the coin that has the highest market capitalization for all transactions in 2018. | Tables: coins -> id, name, slug, symbol, status, category, description, subreddit, notice, tags, tag_names, website, platform_id, date_added, date_launched. historical -> date, coin_id, cmc_rank, market_cap, price, open, ... | name the coin that has the highest market capitalization for all transactions in 2018. |
coinmarketcap | 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' | Question: what is the total value of argentum coined traded in the past 24 hours on 2016/10/11. | Tables: coins -> id, name, slug, symbol, status, category, description, subreddit, notice, tags, tag_names, website, platform_id, date_added, date_launched. historical -> date, coin_id, cmc_rank, market_cap, price, open, h... | what is the total value of argentum coined traded in the past 24 hours on 2016/10/11. |
coinmarketcap | select t2.price from coins as t1 inner join historical as t2 on t1.id = t2.coin_id where t1.name = 'zetacoin' and t2.date between '2013-11-01' and '2013-11-07' union all select avg(t2.price) from coins as t1 inner join historical as t2 on t1.id = t2.coin_id where t1.name = 'zetacoin' and t2.date between '2013-11-01' an... | Question: list the price for zetacoin on 13/11/1 and the next 7 consecutive days. what is the average price for these 7 days? | Tables: coins -> id, name, slug, symbol, status, category, description, subreddit, notice, tags, tag_names, website, platform_id, date_added, date_launched. historical -> date, coin_id, cmc_ra... | list the price for zetacoin on 13/11/1 and the next 7 consecutive days. what is the average price for these 7 days? |
coinmarketcap | select t2.time_high, t2.time_low, t2.date from coins as t1 inner join historical as t2 on t1.id = t2.coin_id where t1.name = 'warp' and strftime('%y-%m', t2.date) = '2016-08' | Question: for all transactions for wrap in august 2016, list the time to achieve highest price and the time to achieve the lowest price. | Tables: coins -> id, name, slug, symbol, status, category, description, subreddit, notice, tags, tag_names, website, platform_id, date_added, date_launched. historical -> date, coin... | for all transactions for wrap in august 2016, list the time to achieve highest price and the time to achieve the lowest price. |
coinmarketcap | select t2.date from coins as t1 inner join historical as t2 on t1.id = t2.coin_id where t1.name = 'digixdao' order by t2.price desc limit 1 | Question: state the transaction date whereby digixdao was transacted at the hightest price. | Tables: coins -> id, name, slug, symbol, status, category, description, subreddit, notice, tags, tag_names, website, platform_id, date_added, date_launched. historical -> date, coin_id, cmc_rank, market_cap, price, open, high,... | state the transaction date whereby digixdao was transacted at the hightest price. |
coinmarketcap | select t1.name, t2.date, t2.price from coins as t1 inner join historical as t2 on t1.id = t2.coin_id where t2.percent_change_24h = ( select max(percent_change_24h) from historical ) | Question: name the coin with the highest percentage price changed in 24 hours. state the transaction date and price. | Tables: coins -> id, name, slug, symbol, status, category, description, subreddit, notice, tags, tag_names, website, platform_id, date_added, date_launched. historical -> date, coin_id, cmc_rank, marke... | name the coin with the highest percentage price changed in 24 hours. state the transaction date and price. |
coinmarketcap | select cast(sum(t2.circulating_supply) as real) / 12 from coins as t1 inner join historical as t2 on t1.id = t2.coin_id where t1.name = 'frozen' and strftime('%y', t2.date) = '2014' | Question: what is the average monthly circulating supply for frozen in 2014. | Tables: coins -> id, name, slug, symbol, status, category, description, subreddit, notice, tags, tag_names, website, platform_id, date_added, date_launched. historical -> date, coin_id, cmc_rank, market_cap, price, open, high, low, close, ti... | what is the average monthly circulating supply for frozen in 2014. |
coinmarketcap | select t1.name, max(t2.date) from coins as t1 inner join historical as t2 on t1.id = t2.coin_id where t1.status = 'inactive' order by t2.date desc limit 1 | Question: list all the inactive coins and state the last date of its transaction? | Tables: coins -> id, name, slug, symbol, status, category, description, subreddit, notice, tags, tag_names, website, platform_id, date_added, date_launched. historical -> date, coin_id, cmc_rank, market_cap, price, open, high, low, clos... | list all the inactive coins and state the last date of its transaction? |
coinmarketcap | select avg(t2.price) from coins as t1 inner join historical as t2 on t1.id = t2.coin_id where t1.name = 'bitcoin' and strftime('%y', t2.date) = '2016' | Question: what was the price of 1 bitcoin in 2016? | Tables: coins -> id, name, slug, symbol, status, category, description, subreddit, notice, tags, tag_names, website, platform_id, date_added, date_launched. historical -> date, coin_id, cmc_rank, market_cap, price, open, high, low, close, time_high, time_low, volume_... | what was the price of 1 bitcoin in 2016? |
coinmarketcap | select t2.date, t2.price from coins as t1 inner join historical as t2 on t1.id = t2.coin_id where t1.name = 'bitcoin' order by t2.price limit 1 | Question: state the transaction date and the price when bitcoin was bottomed? | Tables: coins -> id, name, slug, symbol, status, category, description, subreddit, notice, tags, tag_names, website, platform_id, date_added, date_launched. historical -> date, coin_id, cmc_rank, market_cap, price, open, high, low, close, t... | state the transaction date and the price when bitcoin was bottomed? |
coinmarketcap | select t1.status from coins as t1 inner join historical as t2 on t1.id = t2.coin_id group by t1.name having avg(t2.price) > 1000 | Question: for all coins with average price more than $1000. state the current status of the coin. | Tables: coins -> id, name, slug, symbol, status, category, description, subreddit, notice, tags, tag_names, website, platform_id, date_added, date_launched. historical -> date, coin_id, cmc_rank, market_cap, price, open,... | for all coins with average price more than $1000. state the current status of the coin. |
coinmarketcap | select t1.name, t2.date from coins as t1 inner join historical as t2 on t1.id = t2.coin_id where t2.percent_change_1h = ( select min(percent_change_1h) from historical ) | Question: name the coin and date of transactions with the greatest decline in percent change in 1 hour. | Tables: coins -> id, name, slug, symbol, status, category, description, subreddit, notice, tags, tag_names, website, platform_id, date_added, date_launched. historical -> date, coin_id, cmc_rank, market_cap, price,... | name the coin and date of transactions with the greatest decline in percent change in 1 hour. |
coinmarketcap | select t1.name from coins as t1 inner join historical as t2 on t1.id = t2.coin_id where t1.category = 'token' order by t2.high - t2.low desc limit 1 | Question: name the coin under the token category that gives the highest max profit. | Tables: coins -> id, name, slug, symbol, status, category, description, subreddit, notice, tags, tag_names, website, platform_id, date_added, date_launched. historical -> date, coin_id, cmc_rank, market_cap, price, open, high, low, cl... | name the coin under the token category that gives the highest max profit. |
coinmarketcap | select t1.name from coins as t1 inner join historical as t2 on t1.id = t2.coin_id where t2.date = '2020-06-22' group by t1.name having avg(t2.percent_change_24h) > t2.price | Question: name the coin that have higher than average percentage price changed from the previous 24 hours for transaction on 2013/6/22. | Tables: coins -> id, name, slug, symbol, status, category, description, subreddit, notice, tags, tag_names, website, platform_id, date_added, date_launched. historical -> date, coin_... | name the coin that have higher than average percentage price changed from the previous 24 hours for transaction on 2013/6/22. |
coinmarketcap | select t1.name from coins as t1 inner join historical as t2 on t1.id = t2.coin_id where t2.date = '2013-04-28' and t2.cmc_rank = 1 | Question: which crytocurrency was ranked the first by coinmarketcap on 2013/4/28? | Tables: coins -> id, name, slug, symbol, status, category, description, subreddit, notice, tags, tag_names, website, platform_id, date_added, date_launched. historical -> date, coin_id, cmc_rank, market_cap, price, open, high, low, clos... | which crytocurrency was ranked the first by coinmarketcap on 2013/4/28? |
coinmarketcap | select t2.market_cap from coins as t1 inner join historical as t2 on t1.id = t2.coin_id where t2.date = '2013-04-28' and t1.name = 'bitcoin' | Question: how much dollars was a bitcoin worth on 2013/4/28 according to the coin market? | Tables: coins -> id, name, slug, symbol, status, category, description, subreddit, notice, tags, tag_names, website, platform_id, date_added, date_launched. historical -> date, coin_id, cmc_rank, market_cap, price, open, high, l... | how much dollars was a bitcoin worth on 2013/4/28 according to the coin market? |
coinmarketcap | select t1.name from coins as t1 inner join historical as t2 on t1.id = t2.coin_id where t2.date = '2013-05-03' and t2.open is null | Question: which crytocurrency was not opened on 2013/5/3? | Tables: coins -> id, name, slug, symbol, status, category, description, subreddit, notice, tags, tag_names, website, platform_id, date_added, date_launched. historical -> date, coin_id, cmc_rank, market_cap, price, open, high, low, close, time_high, time_low, ... | which crytocurrency was not opened on 2013/5/3? |
coinmarketcap | select t2.close from coins as t1 inner join historical as t2 on t1.id = t2.coin_id where t2.date = '2013-04-29' and t1.name = 'bitcoin' | Question: what was the price of bitcoin when it closed at the end of the day on 2013/4/29? | Tables: coins -> id, name, slug, symbol, status, category, description, subreddit, notice, tags, tag_names, website, platform_id, date_added, date_launched. historical -> date, coin_id, cmc_rank, market_cap, price, open, high, ... | what was the price of bitcoin when it closed at the end of the day on 2013/4/29? |
coinmarketcap | select t2.time_high from coins as t1 inner join historical as t2 on t1.id = t2.coin_id where t2.date = '2013-04-29' and t1.name = 'bitcoin' | Question: when did bitcoin reach its highest price on 2013/4/29? | Tables: coins -> id, name, slug, symbol, status, category, description, subreddit, notice, tags, tag_names, website, platform_id, date_added, date_launched. historical -> date, coin_id, cmc_rank, market_cap, price, open, high, low, close, time_high, tim... | when did bitcoin reach its highest price on 2013/4/29? |
coinmarketcap | select t2.high - t2.low from coins as t1 inner join historical as t2 on t1.id = t2.coin_id where t2.date = '2013-04-28' and t1.name = 'bitcoin' | Question: what was the max profit a user can make on bitcoin on 2013/4/28? | Tables: coins -> id, name, slug, symbol, status, category, description, subreddit, notice, tags, tag_names, website, platform_id, date_added, date_launched. historical -> date, coin_id, cmc_rank, market_cap, price, open, high, low, close, time... | what was the max profit a user can make on bitcoin on 2013/4/28? |
coinmarketcap | select t2.max_supply - t2.total_supply from coins as t1 inner join historical as t2 on t1.id = t2.coin_id where t2.date = '2013-04-28' and t1.name = 'bitcoin' | Question: what was the number of bitcoins verifiably burned until 2013/4/28? | Tables: coins -> id, name, slug, symbol, status, category, description, subreddit, notice, tags, tag_names, website, platform_id, date_added, date_launched. historical -> date, coin_id, cmc_rank, market_cap, price, open, high, low, close, ti... | what was the number of bitcoins verifiably burned until 2013/4/28? |
coinmarketcap | select t1.name from coins as t1 inner join historical as t2 on t1.id = t2.coin_id where t2.date = '2016-01-08' and t2.volume_24h = ( select max(volume_24h) from historical where date = '2016-01-08' ) | Question: which crytocurrency was traded in the highest value on 2016/1/8? | Tables: coins -> id, name, slug, symbol, status, category, description, subreddit, notice, tags, tag_names, website, platform_id, date_added, date_launched. historical -> date, coin_id, cmc_rank, market_cap, price, open, high, low, close, time... | which crytocurrency was traded in the highest value on 2016/1/8? |
coinmarketcap | select t1.name from coins as t1 inner join historical as t2 on t1.id = t2.coin_id where t2.date = '2013-04-28' and t2.total_supply > 10000000 | Question: please list the names of the crytocurrencies that have a total amount of existence of over 10000000 on 2013/4/28. | Tables: coins -> id, name, slug, symbol, status, category, description, subreddit, notice, tags, tag_names, website, platform_id, date_added, date_launched. historical -> date, coin_id, cmc_rank... | please list the names of the crytocurrencies that have a total amount of existence of over 10000000 on 2013/4/28. |
coinmarketcap | select (case when t2.percent_change_7d > 0 then 'increased' else 'decreased' end) from coins as t1 inner join historical as t2 on t1.id = t2.coin_id where t2.date = '2013-05-05' and t1.name = 'bitcoin' | Question: had bitcoin's price increased or decreased on 2013/5/5 compared with the price 7 days before? | Tables: coins -> id, name, slug, symbol, status, category, description, subreddit, notice, tags, tag_names, website, platform_id, date_added, date_launched. historical -> date, coin_id, cmc_rank, market_cap, price,... | had bitcoin's price increased or decreased on 2013/5/5 compared with the price 7 days before? |
coinmarketcap | select t1.name from coins as t1 inner join historical as t2 on t1.id = t2.coin_id where t2.date = '2013-04-28' and t1.name in ('bitcoin', 'litecoin') order by t2.circulating_supply desc limit 1 | Question: which crytocurrency had a bigger number of coins circulating in the market and in the general public's hands on 2013/4/28, bitcoin or litecoin? | Tables: coins -> id, name, slug, symbol, status, category, description, subreddit, notice, tags, tag_names, website, platform_id, date_added, date_launched. histori... | which crytocurrency had a bigger number of coins circulating in the market and in the general public's hands on 2013/4/28, bitcoin or litecoin? |
coinmarketcap | select t2.price from coins as t1 inner join historical as t2 on t1.id = t2.coin_id where t2.date = '2013-04-28' and t1.name = 'bitcoin' | Question: how much was a bitcoin on 2013/4/28? | Tables: coins -> id, name, slug, symbol, status, category, description, subreddit, notice, tags, tag_names, website, platform_id, date_added, date_launched. historical -> date, coin_id, cmc_rank, market_cap, price, open, high, low, close, time_high, time_low, volume_24h,... | how much was a bitcoin on 2013/4/28? |
coinmarketcap | select avg(t2.price) from coins as t1 inner join historical as t2 on t1.id = t2.coin_id where strftime('%y', t2.date) = '2013' and t1.name = 'bitcoin' | Question: what was the average price of a bitcoin in the year 2013? | Tables: coins -> id, name, slug, symbol, status, category, description, subreddit, notice, tags, tag_names, website, platform_id, date_added, date_launched. historical -> date, coin_id, cmc_rank, market_cap, price, open, high, low, close, time_high, ... | what was the average price of a bitcoin in the year 2013? |
coinmarketcap | select cast((sum(t2.max_supply) - sum(t2.total_supply)) as real) / sum(t2.total_supply) from coins as t1 inner join historical as t2 on t1.id = t2.coin_id where t2.date < '2018-04-28' and t1.name = 'bitcoin' | Question: what was the percentage of the bitcoins verifiably burned until 2018/4/28? | Tables: coins -> id, name, slug, symbol, status, category, description, subreddit, notice, tags, tag_names, website, platform_id, date_added, date_launched. historical -> date, coin_id, cmc_rank, market_cap, price, open, high, low, c... | what was the percentage of the bitcoins verifiably burned until 2018/4/28? |
coinmarketcap | select name from coins where status = 'extinct' | Question: please list the names of coins that has been disappeared. | Tables: coins -> id, name, slug, symbol, status, category, description, subreddit, notice, tags, tag_names, website, platform_id, date_added, date_launched. historical -> date, coin_id, cmc_rank, market_cap, price, open, high, low, close, time_high, ... | please list the names of coins that has been disappeared. |
coinmarketcap | select description from coins where name = 'bitbar' | Question: what's the descripition of bitbar? | Tables: coins -> id, name, slug, symbol, status, category, description, subreddit, notice, tags, tag_names, website, platform_id, date_added, date_launched. historical -> date, coin_id, cmc_rank, market_cap, price, open, high, low, close, time_high, time_low, volume_24h, p... | what's the descripition of bitbar? |
coinmarketcap | select count(id) num from coins where strftime('%y-%m', date_added) = '2013-05' union all select name from coins where strftime('%y-%m', date_added) = '2013-05' | Question: how many coins were added in may 2013? please list the names of coins. | Tables: coins -> id, name, slug, symbol, status, category, description, subreddit, notice, tags, tag_names, website, platform_id, date_added, date_launched. historical -> date, coin_id, cmc_rank, market_cap, price, open, high, low, close... | how many coins were added in may 2013? please list the names of coins. |
coinmarketcap | select name, symbol from coins where date_added like '2013-06-14%' | Question: list the names and symbols of the coins that were added on june 14, 2013. | Tables: coins -> id, name, slug, symbol, status, category, description, subreddit, notice, tags, tag_names, website, platform_id, date_added, date_launched. historical -> date, coin_id, cmc_rank, market_cap, price, open, high, low, cl... | list the names and symbols of the coins that were added on june 14, 2013. |
coinmarketcap | select name from coins where date_added like '2014%' and status = 'untracked' | Question: list the names of coins that cannot be traded in 2014. | Tables: coins -> id, name, slug, symbol, status, category, description, subreddit, notice, tags, tag_names, website, platform_id, date_added, date_launched. historical -> date, coin_id, cmc_rank, market_cap, price, open, high, low, close, time_high, tim... | list the names of coins that cannot be traded in 2014. |
coinmarketcap | select name from coins where length(tag_names) - length(replace(tag_names, ',', '')) = 2 | Question: name the coins that have three tags. | Tables: coins -> id, name, slug, symbol, status, category, description, subreddit, notice, tags, tag_names, website, platform_id, date_added, date_launched. historical -> date, coin_id, cmc_rank, market_cap, price, open, high, low, close, time_high, time_low, volume_24h,... | name the coins that have three tags. |
coinmarketcap | select t1.name from coins as t1 inner join historical as t2 on t1.id = t2.coin_id where t2.price = ( select max(price) from historical ) | Question: what is the name of the coin with the highest price? | Tables: coins -> id, name, slug, symbol, status, category, description, subreddit, notice, tags, tag_names, website, platform_id, date_added, date_launched. historical -> date, coin_id, cmc_rank, market_cap, price, open, high, low, close, time_high, time_... | what is the name of the coin with the highest price? |
coinmarketcap | select t1.name from coins as t1 inner join historical as t2 on t1.id = t2.coin_id where t2.date = '2013-04-29' and t2.cmc_rank = 1 | Question: please name the coin that ranked first among the coins traded on april 29, 2013. | Tables: coins -> id, name, slug, symbol, status, category, description, subreddit, notice, tags, tag_names, website, platform_id, date_added, date_launched. historical -> date, coin_id, cmc_rank, market_cap, price, open, high, ... | please name the coin that ranked first among the coins traded on april 29, 2013. |
coinmarketcap | select t2.date from coins as t1 inner join historical as t2 on t1.id = t2.coin_id where t1.name = 'bitcoin' order by t2.low limit 1 | Question: when is the best time to purchase bitcoin? | Tables: coins -> id, name, slug, symbol, status, category, description, subreddit, notice, tags, tag_names, website, platform_id, date_added, date_launched. historical -> date, coin_id, cmc_rank, market_cap, price, open, high, low, close, time_high, time_low, volum... | when is the best time to purchase bitcoin? |
coinmarketcap | select t1.name from coins as t1 inner join historical as t2 on t1.id = t2.coin_id where t2.volume_24h = ( select max(volume_24h) from historical ) | Question: what is the name of the coin that creates the most total value in the past 24 hours? | Tables: coins -> id, name, slug, symbol, status, category, description, subreddit, notice, tags, tag_names, website, platform_id, date_added, date_launched. historical -> date, coin_id, cmc_rank, market_cap, price, open, hi... | what is the name of the coin that creates the most total value in the past 24 hours? |
coinmarketcap | select t1.name from coins as t1 inner join historical as t2 on t1.id = t2.coin_id where strftime('%y-%m', t2.date) = '2013-05' and t2.open is null | Question: name the coins that were not opened on may 2013. | Tables: coins -> id, name, slug, symbol, status, category, description, subreddit, notice, tags, tag_names, website, platform_id, date_added, date_launched. historical -> date, coin_id, cmc_rank, market_cap, price, open, high, low, close, time_high, time_low,... | name the coins that were not opened on may 2013. |
coinmarketcap | select t2.date from coins as t1 inner join historical as t2 on t1.id = t2.coin_id where t1.name = 'chncoin' order by t2.close desc limit 1 | Question: when is the highest closed price of chncoin? | Tables: coins -> id, name, slug, symbol, status, category, description, subreddit, notice, tags, tag_names, website, platform_id, date_added, date_launched. historical -> date, coin_id, cmc_rank, market_cap, price, open, high, low, close, time_high, time_low, vol... | when is the highest closed price of chncoin? |
coinmarketcap | select t2.date from coins as t1 inner join historical as t2 on t1.id = t2.coin_id where t1.name = 'peercoin' and t2.cmc_rank = 5 | Question: when did peercoin rank fifth? | Tables: coins -> id, name, slug, symbol, status, category, description, subreddit, notice, tags, tag_names, website, platform_id, date_added, date_launched. historical -> date, coin_id, cmc_rank, market_cap, price, open, high, low, close, time_high, time_low, volume_24h, percen... | when did peercoin rank fifth? |
coinmarketcap | select t2.date from coins as t1 inner join historical as t2 on t1.id = t2.coin_id where t1.name = 'devcoin' order by t2.market_cap desc limit 1 | Question: when is devcoin most valuable in the market? | Tables: coins -> id, name, slug, symbol, status, category, description, subreddit, notice, tags, tag_names, website, platform_id, date_added, date_launched. historical -> date, coin_id, cmc_rank, market_cap, price, open, high, low, close, time_high, time_low, vol... | when is devcoin most valuable in the market? |
coinmarketcap | select t1.name from coins as t1 inner join historical as t2 on t1.id = t2.coin_id where t2.date = '2014-01-01' and t2.cmc_rank <= 5 | Question: list the names of the top five coins traded on january 1, 2014. | Tables: coins -> id, name, slug, symbol, status, category, description, subreddit, notice, tags, tag_names, website, platform_id, date_added, date_launched. historical -> date, coin_id, cmc_rank, market_cap, price, open, high, low, close, time_... | list the names of the top five coins traded on january 1, 2014. |
coinmarketcap | select distinct t2.date from coins as t1 inner join historical as t2 on t1.id = t2.coin_id where t1.name = 'lebowskis' and (t2.open is null or t2.open = 0) | Question: when was lebowskis not opened? | Tables: coins -> id, name, slug, symbol, status, category, description, subreddit, notice, tags, tag_names, website, platform_id, date_added, date_launched. historical -> date, coin_id, cmc_rank, market_cap, price, open, high, low, close, time_high, time_low, volume_24h, perce... | when was lebowskis not opened? |
coinmarketcap | select t2.date from coins as t1 inner join historical as t2 on t1.id = t2.coin_id where t1.name = 'terracoin' order by t2.price desc limit 1 | Question: when is the highest price of terracoin? | Tables: coins -> id, name, slug, symbol, status, category, description, subreddit, notice, tags, tag_names, website, platform_id, date_added, date_launched. historical -> date, coin_id, cmc_rank, market_cap, price, open, high, low, close, time_high, time_low, volume_2... | when is the highest price of terracoin? |
coinmarketcap | select count(t2.coin_id) from coins as t1 inner join historical as t2 on t1.id = t2.coin_id where t1.name = 'bytecoin' and strftime('%y-%m', t2.date) = '2013-06' | Question: how many times was bytecoin traded in june 2013? | Tables: coins -> id, name, slug, symbol, status, category, description, subreddit, notice, tags, tag_names, website, platform_id, date_added, date_launched. historical -> date, coin_id, cmc_rank, market_cap, price, open, high, low, close, time_high, time_low,... | how many times was bytecoin traded in june 2013? |
coinmarketcap | select t1.name from coins as t1 inner join historical as t2 on t1.id = t2.coin_id where t2.date = '2018-04-28' and t2.price > ( select avg(price) from historical where date = '2018-04-28' ) | Question: list the names of the coins above the average price on april 28, 2013. | Tables: coins -> id, name, slug, symbol, status, category, description, subreddit, notice, tags, tag_names, website, platform_id, date_added, date_launched. historical -> date, coin_id, cmc_rank, market_cap, price, open, high, low, close... | list the names of the coins above the average price on april 28, 2013. |
coinmarketcap | select t1.name from coins as t1 inner join historical as t2 on t1.id = t2.coin_id where t2.date = '2013-05-29' and t2.percent_change_1h > 0 | Question: what's the percentage of coins that is higher than the price 1 hour ago in may 29,2013? list the names of these coins. | Tables: coins -> id, name, slug, symbol, status, category, description, subreddit, notice, tags, tag_names, website, platform_id, date_added, date_launched. historical -> date, coin_id, cmc... | what's the percentage of coins that is higher than the price 1 hour ago in may 29,2013? list the names of these coins. |
retail_world | select count(employeeid) from employees where titleofcourtesy = 'dr.' | Question: how many employees have obtained a doctorate? | Tables: Categories -> CategoryID, CategoryName, Description. Customers -> CustomerID, CustomerName, ContactName, Address, City, PostalCode, Country. Employees -> EmployeeID, LastName, FirstName, BirthDate, Photo, Notes. Shippers -> ShipperID, ShipperName, Phone.... | how many employees have obtained a doctorate? |
retail_world | select firstname, lastname from employees where employeeid = ( select reportsto from employees where lastname = 'davolio' and firstname = 'nancy' ) | Question: to whom does nancy davolio report? please give that employee's full name. | Tables: Categories -> CategoryID, CategoryName, Description. Customers -> CustomerID, CustomerName, ContactName, Address, City, PostalCode, Country. Employees -> EmployeeID, LastName, FirstName, BirthDate, Photo, Notes. Shippers -> Sh... | to whom does nancy davolio report? please give that employee's full name. |
retail_world | select homephone from employees where lastname = 'davolio' and firstname = 'nancy' | Question: which phone number should i call if i want to reach nancy davolio's home? | Tables: Categories -> CategoryID, CategoryName, Description. Customers -> CustomerID, CustomerName, ContactName, Address, City, PostalCode, Country. Employees -> EmployeeID, LastName, FirstName, BirthDate, Photo, Notes. Shippers -> Sh... | which phone number should i call if i want to reach nancy davolio's home? |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.