db_id
stringlengths
4
31
SQL
stringlengths
18
1.45k
input_sequence
stringlengths
148
11k
question
stringlengths
16
325
voter_2
select advisor , count(*) from student group by advisor
Question: for each advisor, report the total number of students advised by him or her. | Tables: Student -> StuID, LName, Fname, Age, Sex, Major, Advisor, city_code. Voting_record -> StuID, Registration_Date, Election_Cycle, President_Vote, Vice_President_Vote, Secretary_Vote, Treasurer_Vote, Class_President_Vote, Clas...
for each advisor, report the total number of students advised by him or her.
voter_2
select advisor , count(*) from student group by advisor
Question: how many students does each advisor have? | Tables: Student -> StuID, LName, Fname, Age, Sex, Major, Advisor, city_code. Voting_record -> StuID, Registration_Date, Election_Cycle, President_Vote, Vice_President_Vote, Secretary_Vote, Treasurer_Vote, Class_President_Vote, Class_Senator_Vote. | Joins: Voting_rec...
how many students does each advisor have?
voter_2
select advisor from student group by advisor having count(*) > 2
Question: report all advisors that advise more than 2 students. | Tables: Student -> StuID, LName, Fname, Age, Sex, Major, Advisor, city_code. Voting_record -> StuID, Registration_Date, Election_Cycle, President_Vote, Vice_President_Vote, Secretary_Vote, Treasurer_Vote, Class_President_Vote, Class_Senator_Vote. | Joins...
report all advisors that advise more than 2 students.
voter_2
select advisor from student group by advisor having count(*) > 2
Question: which advisors have more than two students? | Tables: Student -> StuID, LName, Fname, Age, Sex, Major, Advisor, city_code. Voting_record -> StuID, Registration_Date, Election_Cycle, President_Vote, Vice_President_Vote, Secretary_Vote, Treasurer_Vote, Class_President_Vote, Class_Senator_Vote. | Joins: Voting_r...
which advisors have more than two students?
voter_2
select major from student group by major having count(*) < 3
Question: report all majors that have less than 3 students. | Tables: Student -> StuID, LName, Fname, Age, Sex, Major, Advisor, city_code. Voting_record -> StuID, Registration_Date, Election_Cycle, President_Vote, Vice_President_Vote, Secretary_Vote, Treasurer_Vote, Class_President_Vote, Class_Senator_Vote. | Joins: Vo...
report all majors that have less than 3 students.
voter_2
select major from student group by major having count(*) < 3
Question: what are the majors only less than three students are studying? | Tables: Student -> StuID, LName, Fname, Age, Sex, Major, Advisor, city_code. Voting_record -> StuID, Registration_Date, Election_Cycle, President_Vote, Vice_President_Vote, Secretary_Vote, Treasurer_Vote, Class_President_Vote, Class_Senator_Vot...
what are the majors only less than three students are studying?
voter_2
select election_cycle , count(*) from voting_record group by election_cycle
Question: for each election cycle, report the number of voting records. | Tables: Student -> StuID, LName, Fname, Age, Sex, Major, Advisor, city_code. Voting_record -> StuID, Registration_Date, Election_Cycle, President_Vote, Vice_President_Vote, Secretary_Vote, Treasurer_Vote, Class_President_Vote, Class_Senator_Vote....
for each election cycle, report the number of voting records.
voter_2
select election_cycle , count(*) from voting_record group by election_cycle
Question: count the number of voting records for each election cycle. | Tables: Student -> StuID, LName, Fname, Age, Sex, Major, Advisor, city_code. Voting_record -> StuID, Registration_Date, Election_Cycle, President_Vote, Vice_President_Vote, Secretary_Vote, Treasurer_Vote, Class_President_Vote, Class_Senator_Vote. |...
count the number of voting records for each election cycle.
voter_2
select major from student group by major order by count(*) desc limit 1
Question: which major has the most students? | Tables: Student -> StuID, LName, Fname, Age, Sex, Major, Advisor, city_code. Voting_record -> StuID, Registration_Date, Election_Cycle, President_Vote, Vice_President_Vote, Secretary_Vote, Treasurer_Vote, Class_President_Vote, Class_Senator_Vote. | Joins: Voting_record.Cla...
which major has the most students?
voter_2
select major from student group by major order by count(*) desc limit 1
Question: find the major that is studied by the largest number of students. | Tables: Student -> StuID, LName, Fname, Age, Sex, Major, Advisor, city_code. Voting_record -> StuID, Registration_Date, Election_Cycle, President_Vote, Vice_President_Vote, Secretary_Vote, Treasurer_Vote, Class_President_Vote, Class_Senator_V...
find the major that is studied by the largest number of students.
voter_2
select major from student where sex = 'f' group by major order by count(*) desc limit 1
Question: what is the most common major among female (sex is f) students? | Tables: Student -> StuID, LName, Fname, Age, Sex, Major, Advisor, city_code. Voting_record -> StuID, Registration_Date, Election_Cycle, President_Vote, Vice_President_Vote, Secretary_Vote, Treasurer_Vote, Class_President_Vote, Class_Senator_Vot...
what is the most common major among female (sex is f) students?
voter_2
select major from student where sex = 'f' group by major order by count(*) desc limit 1
Question: find the major that is studied by the most female students. | Tables: Student -> StuID, LName, Fname, Age, Sex, Major, Advisor, city_code. Voting_record -> StuID, Registration_Date, Election_Cycle, President_Vote, Vice_President_Vote, Secretary_Vote, Treasurer_Vote, Class_President_Vote, Class_Senator_Vote. |...
find the major that is studied by the most female students.
voter_2
select city_code from student group by city_code order by count(*) desc limit 1
Question: what is the city_code of the city that the most students live in? | Tables: Student -> StuID, LName, Fname, Age, Sex, Major, Advisor, city_code. Voting_record -> StuID, Registration_Date, Election_Cycle, President_Vote, Vice_President_Vote, Secretary_Vote, Treasurer_Vote, Class_President_Vote, Class_Senator_V...
what is the city_code of the city that the most students live in?
voter_2
select city_code from student group by city_code order by count(*) desc limit 1
Question: return the code of the city that has the most students. | Tables: Student -> StuID, LName, Fname, Age, Sex, Major, Advisor, city_code. Voting_record -> StuID, Registration_Date, Election_Cycle, President_Vote, Vice_President_Vote, Secretary_Vote, Treasurer_Vote, Class_President_Vote, Class_Senator_Vote. | Joi...
return the code of the city that has the most students.
voter_2
select advisor from student group by advisor having count(*) > 2
Question: report the distinct advisors who have more than 2 students. | Tables: Student -> StuID, LName, Fname, Age, Sex, Major, Advisor, city_code. Voting_record -> StuID, Registration_Date, Election_Cycle, President_Vote, Vice_President_Vote, Secretary_Vote, Treasurer_Vote, Class_President_Vote, Class_Senator_Vote. |...
report the distinct advisors who have more than 2 students.
voter_2
select advisor from student group by advisor having count(*) > 2
Question: which advisors are advising more than 2 students? | Tables: Student -> StuID, LName, Fname, Age, Sex, Major, Advisor, city_code. Voting_record -> StuID, Registration_Date, Election_Cycle, President_Vote, Vice_President_Vote, Secretary_Vote, Treasurer_Vote, Class_President_Vote, Class_Senator_Vote. | Joins: Vo...
which advisors are advising more than 2 students?
products_gen_characteristics
select count(*) from products
Question: how many products are there? | Tables: Ref_Characteristic_Types -> characteristic_type_code, characteristic_type_description. Ref_Colors -> color_code, color_description. Ref_Product_Categories -> product_category_code, product_category_description, unit_of_measure. Characteristics -> characteristic_id, chara...
how many products are there?
products_gen_characteristics
select count(*) from products
Question: count the number of products. | Tables: Ref_Characteristic_Types -> characteristic_type_code, characteristic_type_description. Ref_Colors -> color_code, color_description. Ref_Product_Categories -> product_category_code, product_category_description, unit_of_measure. Characteristics -> characteristic_id, char...
count the number of products.
products_gen_characteristics
select count(*) from ref_colors
Question: how many colors are there? | Tables: Ref_Characteristic_Types -> characteristic_type_code, characteristic_type_description. Ref_Colors -> color_code, color_description. Ref_Product_Categories -> product_category_code, product_category_description, unit_of_measure. Characteristics -> characteristic_id, charact...
how many colors are there?
products_gen_characteristics
select count(*) from ref_colors
Question: count the number of colors. | Tables: Ref_Characteristic_Types -> characteristic_type_code, characteristic_type_description. Ref_Colors -> color_code, color_description. Ref_Product_Categories -> product_category_code, product_category_description, unit_of_measure. Characteristics -> characteristic_id, charac...
count the number of colors.
products_gen_characteristics
select count(*) from characteristics
Question: how many characteristics are there? | Tables: Ref_Characteristic_Types -> characteristic_type_code, characteristic_type_description. Ref_Colors -> color_code, color_description. Ref_Product_Categories -> product_category_code, product_category_description, unit_of_measure. Characteristics -> characteristic_id...
how many characteristics are there?
products_gen_characteristics
select count(*) from characteristics
Question: count the number of characteristics. | Tables: Ref_Characteristic_Types -> characteristic_type_code, characteristic_type_description. Ref_Colors -> color_code, color_description. Ref_Product_Categories -> product_category_code, product_category_description, unit_of_measure. Characteristics -> characteristic_i...
count the number of characteristics.
products_gen_characteristics
select product_name , typical_buying_price from products
Question: what are the names and buying prices of all the products? | Tables: Ref_Characteristic_Types -> characteristic_type_code, characteristic_type_description. Ref_Colors -> color_code, color_description. Ref_Product_Categories -> product_category_code, product_category_description, unit_of_measure. Characteristic...
what are the names and buying prices of all the products?
products_gen_characteristics
select product_name , typical_buying_price from products
Question: return the names and typical buying prices for all products. | Tables: Ref_Characteristic_Types -> characteristic_type_code, characteristic_type_description. Ref_Colors -> color_code, color_description. Ref_Product_Categories -> product_category_code, product_category_description, unit_of_measure. Characteris...
return the names and typical buying prices for all products.
products_gen_characteristics
select color_description from ref_colors
Question: list the description of all the colors. | Tables: Ref_Characteristic_Types -> characteristic_type_code, characteristic_type_description. Ref_Colors -> color_code, color_description. Ref_Product_Categories -> product_category_code, product_category_description, unit_of_measure. Characteristics -> characteristi...
list the description of all the colors.
products_gen_characteristics
select color_description from ref_colors
Question: what are the descriptions for each color? | Tables: Ref_Characteristic_Types -> characteristic_type_code, characteristic_type_description. Ref_Colors -> color_code, color_description. Ref_Product_Categories -> product_category_code, product_category_description, unit_of_measure. Characteristics -> characteris...
what are the descriptions for each color?
products_gen_characteristics
select distinct characteristic_name from characteristics
Question: find the names of all the product characteristics. | Tables: Ref_Characteristic_Types -> characteristic_type_code, characteristic_type_description. Ref_Colors -> color_code, color_description. Ref_Product_Categories -> product_category_code, product_category_description, unit_of_measure. Characteristics -> ch...
find the names of all the product characteristics.
products_gen_characteristics
select distinct characteristic_name from characteristics
Question: what are the different names of the product characteristics? | Tables: Ref_Characteristic_Types -> characteristic_type_code, characteristic_type_description. Ref_Colors -> color_code, color_description. Ref_Product_Categories -> product_category_code, product_category_description, unit_of_measure. Characteris...
what are the different names of the product characteristics?
products_gen_characteristics
select product_name from products where product_category_code = 'spices'
Question: what are the names of products with category 'spices'? | Tables: Ref_Characteristic_Types -> characteristic_type_code, characteristic_type_description. Ref_Colors -> color_code, color_description. Ref_Product_Categories -> product_category_code, product_category_description, unit_of_measure. Characteristics -...
what are the names of products with category 'spices'?
products_gen_characteristics
select product_name from products where product_category_code = 'spices'
Question: return the names of products in the category 'spices'. | Tables: Ref_Characteristic_Types -> characteristic_type_code, characteristic_type_description. Ref_Colors -> color_code, color_description. Ref_Product_Categories -> product_category_code, product_category_description, unit_of_measure. Characteristics -...
return the names of products in the category 'spices'.
products_gen_characteristics
select t1.product_name , t2.color_description , t1.product_description from products as t1 join ref_colors as t2 on t1.color_code = t2.color_code where product_category_code = 'herbs'
Question: list the names, color descriptions and product descriptions of products with category 'herbs'. | Tables: Ref_Characteristic_Types -> characteristic_type_code, characteristic_type_description. Ref_Colors -> color_code, color_description. Ref_Product_Categories -> product_category_code, product_category_descrip...
list the names, color descriptions and product descriptions of products with category 'herbs'.
products_gen_characteristics
select t1.product_name , t2.color_description , t1.product_description from products as t1 join ref_colors as t2 on t1.color_code = t2.color_code where product_category_code = 'herbs'
Question: what are the names, color descriptions, and product descriptions for products in the 'herbs' category? | Tables: Ref_Characteristic_Types -> characteristic_type_code, characteristic_type_description. Ref_Colors -> color_code, color_description. Ref_Product_Categories -> product_category_code, product_category...
what are the names, color descriptions, and product descriptions for products in the 'herbs' category?
products_gen_characteristics
select count(*) from products where product_category_code = 'seeds'
Question: how many products are there under the category 'seeds'? | Tables: Ref_Characteristic_Types -> characteristic_type_code, characteristic_type_description. Ref_Colors -> color_code, color_description. Ref_Product_Categories -> product_category_code, product_category_description, unit_of_measure. Characteristics ...
how many products are there under the category 'seeds'?
products_gen_characteristics
select count(*) from products where product_category_code = 'seeds'
Question: count the number of products in the category 'seeds'. | Tables: Ref_Characteristic_Types -> characteristic_type_code, characteristic_type_description. Ref_Colors -> color_code, color_description. Ref_Product_Categories -> product_category_code, product_category_description, unit_of_measure. Characteristics ->...
count the number of products in the category 'seeds'.
products_gen_characteristics
select count(*) from products where product_category_code = 'spices' and typical_buying_price > 1000
Question: find the number of products with category 'spices' and typically sold above 1000. | Tables: Ref_Characteristic_Types -> characteristic_type_code, characteristic_type_description. Ref_Colors -> color_code, color_description. Ref_Product_Categories -> product_category_code, product_category_description, unit_of...
find the number of products with category 'spices' and typically sold above 1000.
products_gen_characteristics
select count(*) from products where product_category_code = 'spices' and typical_buying_price > 1000
Question: how many products are in the 'spices' category and have a typical price of over 1000? | Tables: Ref_Characteristic_Types -> characteristic_type_code, characteristic_type_description. Ref_Colors -> color_code, color_description. Ref_Product_Categories -> product_category_code, product_category_description, uni...
how many products are in the 'spices' category and have a typical price of over 1000?
products_gen_characteristics
select product_category_code , typical_buying_price from products where product_name = 'cumin'
Question: what is the category and typical buying price of the product with name 'cumin'? | Tables: Ref_Characteristic_Types -> characteristic_type_code, characteristic_type_description. Ref_Colors -> color_code, color_description. Ref_Product_Categories -> product_category_code, product_category_description, unit_of_...
what is the category and typical buying price of the product with name 'cumin'?
products_gen_characteristics
select product_category_code , typical_buying_price from products where product_name = 'cumin'
Question: return the category code and typical price of 'cumin'. | Tables: Ref_Characteristic_Types -> characteristic_type_code, characteristic_type_description. Ref_Colors -> color_code, color_description. Ref_Product_Categories -> product_category_code, product_category_description, unit_of_measure. Characteristics -...
return the category code and typical price of 'cumin'.
products_gen_characteristics
select product_category_code from products where product_name = 'flax'
Question: which category does the product named 'flax' belong to? | Tables: Ref_Characteristic_Types -> characteristic_type_code, characteristic_type_description. Ref_Colors -> color_code, color_description. Ref_Product_Categories -> product_category_code, product_category_description, unit_of_measure. Characteristics ...
which category does the product named 'flax' belong to?
products_gen_characteristics
select product_category_code from products where product_name = 'flax'
Question: what is the code of the category that the product with the name 'flax' belongs to? | Tables: Ref_Characteristic_Types -> characteristic_type_code, characteristic_type_description. Ref_Colors -> color_code, color_description. Ref_Product_Categories -> product_category_code, product_category_description, unit_o...
what is the code of the category that the product with the name 'flax' belongs to?
products_gen_characteristics
select t1.product_name from products as t1 join ref_colors as t2 on t1.color_code = t2.color_code where t2.color_description = 'yellow'
Question: what is the name of the product with the color description 'yellow'? | Tables: Ref_Characteristic_Types -> characteristic_type_code, characteristic_type_description. Ref_Colors -> color_code, color_description. Ref_Product_Categories -> product_category_code, product_category_description, unit_of_measure. Cha...
what is the name of the product with the color description 'yellow'?
products_gen_characteristics
select t1.product_name from products as t1 join ref_colors as t2 on t1.color_code = t2.color_code where t2.color_description = 'yellow'
Question: give the name of the products that have a color description 'yellow'. | Tables: Ref_Characteristic_Types -> characteristic_type_code, characteristic_type_description. Ref_Colors -> color_code, color_description. Ref_Product_Categories -> product_category_code, product_category_description, unit_of_measure. Ch...
give the name of the products that have a color description 'yellow'.
products_gen_characteristics
select t1.product_category_description from ref_product_categories as t1 join products as t2 on t1.product_category_code = t2.product_category_code where t2.product_description like '%t%'
Question: find the category descriptions of the products whose descriptions include letter 't'. | Tables: Ref_Characteristic_Types -> characteristic_type_code, characteristic_type_description. Ref_Colors -> color_code, color_description. Ref_Product_Categories -> product_category_code, product_category_description, uni...
find the category descriptions of the products whose descriptions include letter 't'.
products_gen_characteristics
select t1.product_category_description from ref_product_categories as t1 join products as t2 on t1.product_category_code = t2.product_category_code where t2.product_description like '%t%'
Question: what are the descriptions of the categories that products with product descriptions that contain the letter t are in? | Tables: Ref_Characteristic_Types -> characteristic_type_code, characteristic_type_description. Ref_Colors -> color_code, color_description. Ref_Product_Categories -> product_category_code, p...
what are the descriptions of the categories that products with product descriptions that contain the letter t are in?
products_gen_characteristics
select t2.color_description from products as t1 join ref_colors as t2 on t1.color_code = t2.color_code where t1.product_name = 'catnip'
Question: what is the color description of the product with name 'catnip'? | Tables: Ref_Characteristic_Types -> characteristic_type_code, characteristic_type_description. Ref_Colors -> color_code, color_description. Ref_Product_Categories -> product_category_code, product_category_description, unit_of_measure. Charact...
what is the color description of the product with name 'catnip'?
products_gen_characteristics
select t2.color_description from products as t1 join ref_colors as t2 on t1.color_code = t2.color_code where t1.product_name = 'catnip'
Question: give the color description for the product 'catnip'. | Tables: Ref_Characteristic_Types -> characteristic_type_code, characteristic_type_description. Ref_Colors -> color_code, color_description. Ref_Product_Categories -> product_category_code, product_category_description, unit_of_measure. Characteristics -> ...
give the color description for the product 'catnip'.
products_gen_characteristics
select t1.color_code , t2.color_description from products as t1 join ref_colors as t2 on t1.color_code = t2.color_code where t1.product_name = 'chervil'
Question: what is the color code and description of the product named 'chervil'? | Tables: Ref_Characteristic_Types -> characteristic_type_code, characteristic_type_description. Ref_Colors -> color_code, color_description. Ref_Product_Categories -> product_category_code, product_category_description, unit_of_measure. C...
what is the color code and description of the product named 'chervil'?
products_gen_characteristics
select t1.color_code , t2.color_description from products as t1 join ref_colors as t2 on t1.color_code = t2.color_code where t1.product_name = 'chervil'
Question: return the color code and description for the product with the name 'chervil'. | Tables: Ref_Characteristic_Types -> characteristic_type_code, characteristic_type_description. Ref_Colors -> color_code, color_description. Ref_Product_Categories -> product_category_code, product_category_description, unit_of_me...
return the color code and description for the product with the name 'chervil'.
products_gen_characteristics
select t1.product_id , t2.color_description from products as t1 join ref_colors as t2 on t1.color_code = t2.color_code join product_characteristics as t3 on t1.product_id = t3.product_id group by t1.product_id having count(*) >= 2
Question: find the id and color description of the products with at least 2 characteristics. | Tables: Ref_Characteristic_Types -> characteristic_type_code, characteristic_type_description. Ref_Colors -> color_code, color_description. Ref_Product_Categories -> product_category_code, product_category_description, unit_o...
find the id and color description of the products with at least 2 characteristics.
products_gen_characteristics
select t1.product_id , t2.color_description from products as t1 join ref_colors as t2 on t1.color_code = t2.color_code join product_characteristics as t3 on t1.product_id = t3.product_id group by t1.product_id having count(*) >= 2
Question: what are the product ids and color descriptions for products with two or more characteristics? | Tables: Ref_Characteristic_Types -> characteristic_type_code, characteristic_type_description. Ref_Colors -> color_code, color_description. Ref_Product_Categories -> product_category_code, product_category_descrip...
what are the product ids and color descriptions for products with two or more characteristics?
products_gen_characteristics
select t1.product_name from products as t1 join ref_colors as t2 on t1.color_code = t2.color_code where t2.color_description = 'white'
Question: list all the product names with the color description 'white'. | Tables: Ref_Characteristic_Types -> characteristic_type_code, characteristic_type_description. Ref_Colors -> color_code, color_description. Ref_Product_Categories -> product_category_code, product_category_description, unit_of_measure. Character...
list all the product names with the color description 'white'.
products_gen_characteristics
select t1.product_name from products as t1 join ref_colors as t2 on t1.color_code = t2.color_code where t2.color_description = 'white'
Question: what are the names of products with 'white' as their color description? | Tables: Ref_Characteristic_Types -> characteristic_type_code, characteristic_type_description. Ref_Colors -> color_code, color_description. Ref_Product_Categories -> product_category_code, product_category_description, unit_of_measure. ...
what are the names of products with 'white' as their color description?
products_gen_characteristics
select t1.product_name , t1.typical_buying_price , t1.typical_selling_price from products as t1 join ref_colors as t2 on t1.color_code = t2.color_code where t2.color_description = 'yellow'
Question: what are the name and typical buying and selling prices of the products that have color described as 'yellow'? | Tables: Ref_Characteristic_Types -> characteristic_type_code, characteristic_type_description. Ref_Colors -> color_code, color_description. Ref_Product_Categories -> product_category_code, product_...
what are the name and typical buying and selling prices of the products that have color described as 'yellow'?
products_gen_characteristics
select t1.product_name , t1.typical_buying_price , t1.typical_selling_price from products as t1 join ref_colors as t2 on t1.color_code = t2.color_code where t2.color_description = 'yellow'
Question: return the names and typical buying and selling prices for products that have 'yellow' as their color description. | Tables: Ref_Characteristic_Types -> characteristic_type_code, characteristic_type_description. Ref_Colors -> color_code, color_description. Ref_Product_Categories -> product_category_code, prod...
return the names and typical buying and selling prices for products that have 'yellow' as their color description.
products_gen_characteristics
select count(*) from products as t1 join product_characteristics as t2 on t1.product_id = t2.product_id where t1.product_name = 'sesame'
Question: how many characteristics does the product named 'sesame' have? | Tables: Ref_Characteristic_Types -> characteristic_type_code, characteristic_type_description. Ref_Colors -> color_code, color_description. Ref_Product_Categories -> product_category_code, product_category_description, unit_of_measure. Character...
how many characteristics does the product named 'sesame' have?
products_gen_characteristics
select count(*) from products as t1 join product_characteristics as t2 on t1.product_id = t2.product_id where t1.product_name = 'sesame'
Question: count the number of characteristics the product 'sesame' has. | Tables: Ref_Characteristic_Types -> characteristic_type_code, characteristic_type_description. Ref_Colors -> color_code, color_description. Ref_Product_Categories -> product_category_code, product_category_description, unit_of_measure. Characteri...
count the number of characteristics the product 'sesame' has.
products_gen_characteristics
select count(distinct t3.characteristic_name) from products as t1 join product_characteristics as t2 on t1.product_id = t2.product_id join characteristics as t3 on t2.characteristic_id = t3.characteristic_id where t1.product_name = 'sesame'
Question: how many distinct characteristic names does the product 'cumin' have? | Tables: Ref_Characteristic_Types -> characteristic_type_code, characteristic_type_description. Ref_Colors -> color_code, color_description. Ref_Product_Categories -> product_category_code, product_category_description, unit_of_measure. Ch...
how many distinct characteristic names does the product 'cumin' have?
products_gen_characteristics
select count(distinct t3.characteristic_name) from products as t1 join product_characteristics as t2 on t1.product_id = t2.product_id join characteristics as t3 on t2.characteristic_id = t3.characteristic_id where t1.product_name = 'sesame'
Question: count the number of different characteristic names the product 'cumin' has. | Tables: Ref_Characteristic_Types -> characteristic_type_code, characteristic_type_description. Ref_Colors -> color_code, color_description. Ref_Product_Categories -> product_category_code, product_category_description, unit_of_measu...
count the number of different characteristic names the product 'cumin' has.
products_gen_characteristics
select t3.characteristic_name from products as t1 join product_characteristics as t2 on t1.product_id = t2.product_id join characteristics as t3 on t2.characteristic_id = t3.characteristic_id where t1.product_name = 'sesame'
Question: what are all the characteristic names of product 'sesame'? | Tables: Ref_Characteristic_Types -> characteristic_type_code, characteristic_type_description. Ref_Colors -> color_code, color_description. Ref_Product_Categories -> product_category_code, product_category_description, unit_of_measure. Characteristi...
what are all the characteristic names of product 'sesame'?
products_gen_characteristics
select t3.characteristic_name from products as t1 join product_characteristics as t2 on t1.product_id = t2.product_id join characteristics as t3 on t2.characteristic_id = t3.characteristic_id where t1.product_name = 'sesame'
Question: return the characteristic names of the 'sesame' product. | Tables: Ref_Characteristic_Types -> characteristic_type_code, characteristic_type_description. Ref_Colors -> color_code, color_description. Ref_Product_Categories -> product_category_code, product_category_description, unit_of_measure. Characteristics...
return the characteristic names of the 'sesame' product.
products_gen_characteristics
select t3.characteristic_name , t3.characteristic_data_type from products as t1 join product_characteristics as t2 on t1.product_id = t2.product_id join characteristics as t3 on t2.characteristic_id = t3.characteristic_id where t1.product_name = 'cumin'
Question: list all the characteristic names and data types of product 'cumin'. | Tables: Ref_Characteristic_Types -> characteristic_type_code, characteristic_type_description. Ref_Colors -> color_code, color_description. Ref_Product_Categories -> product_category_code, product_category_description, unit_of_measure. Cha...
list all the characteristic names and data types of product 'cumin'.
products_gen_characteristics
select t3.characteristic_name , t3.characteristic_data_type from products as t1 join product_characteristics as t2 on t1.product_id = t2.product_id join characteristics as t3 on t2.characteristic_id = t3.characteristic_id where t1.product_name = 'cumin'
Question: what are the names and data types of the characteristics of the 'cumin' product? | Tables: Ref_Characteristic_Types -> characteristic_type_code, characteristic_type_description. Ref_Colors -> color_code, color_description. Ref_Product_Categories -> product_category_code, product_category_description, unit_of_...
what are the names and data types of the characteristics of the 'cumin' product?
products_gen_characteristics
select t3.characteristic_name from products as t1 join product_characteristics as t2 on t1.product_id = t2.product_id join characteristics as t3 on t2.characteristic_id = t3.characteristic_id where t1.product_name = 'sesame' and t3.characteristic_type_code = 'grade'
Question: list all characteristics of product named 'sesame' with type code 'grade'. | Tables: Ref_Characteristic_Types -> characteristic_type_code, characteristic_type_description. Ref_Colors -> color_code, color_description. Ref_Product_Categories -> product_category_code, product_category_description, unit_of_measur...
list all characteristics of product named 'sesame' with type code 'grade'.
products_gen_characteristics
select t3.characteristic_name from products as t1 join product_characteristics as t2 on t1.product_id = t2.product_id join characteristics as t3 on t2.characteristic_id = t3.characteristic_id where t1.product_name = 'sesame' and t3.characteristic_type_code = 'grade'
Question: what are the names of the characteristics of the product 'sesame' that have the characteristic type code 'grade'? | Tables: Ref_Characteristic_Types -> characteristic_type_code, characteristic_type_description. Ref_Colors -> color_code, color_description. Ref_Product_Categories -> product_category_code, produ...
what are the names of the characteristics of the product 'sesame' that have the characteristic type code 'grade'?
products_gen_characteristics
select count(*) from products as t1 join product_characteristics as t2 on t1.product_id = t2.product_id join characteristics as t3 on t2.characteristic_id = t3.characteristic_id where t1.product_name = 'laurel'
Question: how many characteristics does the product named 'laurel' have? | Tables: Ref_Characteristic_Types -> characteristic_type_code, characteristic_type_description. Ref_Colors -> color_code, color_description. Ref_Product_Categories -> product_category_code, product_category_description, unit_of_measure. Character...
how many characteristics does the product named 'laurel' have?
products_gen_characteristics
select count(*) from products as t1 join product_characteristics as t2 on t1.product_id = t2.product_id join characteristics as t3 on t2.characteristic_id = t3.characteristic_id where t1.product_name = 'laurel'
Question: count the number of characteristics of the product named 'laurel'. | Tables: Ref_Characteristic_Types -> characteristic_type_code, characteristic_type_description. Ref_Colors -> color_code, color_description. Ref_Product_Categories -> product_category_code, product_category_description, unit_of_measure. Chara...
count the number of characteristics of the product named 'laurel'.
products_gen_characteristics
select count(*) from products as t1 join product_characteristics as t2 on t1.product_id = t2.product_id join characteristics as t3 on t2.characteristic_id = t3.characteristic_id where t1.product_name = 'flax'
Question: find the number of characteristics that the product 'flax' has. | Tables: Ref_Characteristic_Types -> characteristic_type_code, characteristic_type_description. Ref_Colors -> color_code, color_description. Ref_Product_Categories -> product_category_code, product_category_description, unit_of_measure. Characte...
find the number of characteristics that the product 'flax' has.
products_gen_characteristics
select count(*) from products as t1 join product_characteristics as t2 on t1.product_id = t2.product_id join characteristics as t3 on t2.characteristic_id = t3.characteristic_id where t1.product_name = 'flax'
Question: count the number of characteristics of the 'flax' product. | Tables: Ref_Characteristic_Types -> characteristic_type_code, characteristic_type_description. Ref_Colors -> color_code, color_description. Ref_Product_Categories -> product_category_code, product_category_description, unit_of_measure. Characteristi...
count the number of characteristics of the 'flax' product.
products_gen_characteristics
select product_name from products as t1 join product_characteristics as t2 on t1.product_id = t2.product_id join characteristics as t3 on t2.characteristic_id = t3.characteristic_id join ref_colors as t4 on t1.color_code = t4.color_code where t4.color_description = 'red' and t3.characteristic_name = 'fast'
Question: find the name of the products that have the color description 'red' and have the characteristic name 'fast'. | Tables: Ref_Characteristic_Types -> characteristic_type_code, characteristic_type_description. Ref_Colors -> color_code, color_description. Ref_Product_Categories -> product_category_code, product_ca...
find the name of the products that have the color description 'red' and have the characteristic name 'fast'.
products_gen_characteristics
select product_name from products as t1 join product_characteristics as t2 on t1.product_id = t2.product_id join characteristics as t3 on t2.characteristic_id = t3.characteristic_id join ref_colors as t4 on t1.color_code = t4.color_code where t4.color_description = 'red' and t3.characteristic_name = 'fast'
Question: what are the names of the products that have a color description of 'red' and the 'fast' characteristic? | Tables: Ref_Characteristic_Types -> characteristic_type_code, characteristic_type_description. Ref_Colors -> color_code, color_description. Ref_Product_Categories -> product_category_code, product_catego...
what are the names of the products that have a color description of 'red' and the 'fast' characteristic?
products_gen_characteristics
select count(*) from products as t1 join product_characteristics as t2 on t1.product_id = t2.product_id join characteristics as t3 on t2.characteristic_id = t3.characteristic_id where t3.characteristic_name = 'hot'
Question: how many products have the characteristic named 'hot'? | Tables: Ref_Characteristic_Types -> characteristic_type_code, characteristic_type_description. Ref_Colors -> color_code, color_description. Ref_Product_Categories -> product_category_code, product_category_description, unit_of_measure. Characteristics -...
how many products have the characteristic named 'hot'?
products_gen_characteristics
select count(*) from products as t1 join product_characteristics as t2 on t1.product_id = t2.product_id join characteristics as t3 on t2.characteristic_id = t3.characteristic_id where t3.characteristic_name = 'hot'
Question: count the number of products with the 'hot' charactersitic. | Tables: Ref_Characteristic_Types -> characteristic_type_code, characteristic_type_description. Ref_Colors -> color_code, color_description. Ref_Product_Categories -> product_category_code, product_category_description, unit_of_measure. Characterist...
count the number of products with the 'hot' charactersitic.
products_gen_characteristics
select distinct t1.product_name from products as t1 join product_characteristics as t2 on t1.product_id = t2.product_id join characteristics as t3 on t2.characteristic_id = t3.characteristic_id where t3.characteristic_name = 'warm'
Question: list the all the distinct names of the products with the characteristic name 'warm'. | Tables: Ref_Characteristic_Types -> characteristic_type_code, characteristic_type_description. Ref_Colors -> color_code, color_description. Ref_Product_Categories -> product_category_code, product_category_description, unit...
list the all the distinct names of the products with the characteristic name 'warm'.
products_gen_characteristics
select distinct t1.product_name from products as t1 join product_characteristics as t2 on t1.product_id = t2.product_id join characteristics as t3 on t2.characteristic_id = t3.characteristic_id where t3.characteristic_name = 'warm'
Question: what are the different product names for products that have the 'warm' characteristic:? | Tables: Ref_Characteristic_Types -> characteristic_type_code, characteristic_type_description. Ref_Colors -> color_code, color_description. Ref_Product_Categories -> product_category_code, product_category_description, u...
what are the different product names for products that have the 'warm' characteristic:?
products_gen_characteristics
select count(*) from products as t1 join product_characteristics as t2 on t1.product_id = t2.product_id join characteristics as t3 on t2.characteristic_id = t3.characteristic_id join ref_colors as t4 on t1.color_code = t4.color_code where t4.color_description = 'red' and t3.characteristic_name = 'slow'
Question: find the number of the products that have their color described as 'red' and have a characteristic named 'slow'. | Tables: Ref_Characteristic_Types -> characteristic_type_code, characteristic_type_description. Ref_Colors -> color_code, color_description. Ref_Product_Categories -> product_category_code, produc...
find the number of the products that have their color described as 'red' and have a characteristic named 'slow'.
products_gen_characteristics
select count(*) from products as t1 join product_characteristics as t2 on t1.product_id = t2.product_id join characteristics as t3 on t2.characteristic_id = t3.characteristic_id join ref_colors as t4 on t1.color_code = t4.color_code where t4.color_description = 'red' and t3.characteristic_name = 'slow'
Question: how many products have the color description 'red' and the characteristic name 'slow'? | Tables: Ref_Characteristic_Types -> characteristic_type_code, characteristic_type_description. Ref_Colors -> color_code, color_description. Ref_Product_Categories -> product_category_code, product_category_description, un...
how many products have the color description 'red' and the characteristic name 'slow'?
products_gen_characteristics
select count(*) from products as t1 join product_characteristics as t2 on t1.product_id = t2.product_id join characteristics as t3 on t2.characteristic_id = t3.characteristic_id join ref_colors as t4 on t1.color_code = t4.color_code where t4.color_description = 'white' or t3.characteristic_name = 'hot'
Question: count the products that have the color description 'white' or have the characteristic name 'hot'. | Tables: Ref_Characteristic_Types -> characteristic_type_code, characteristic_type_description. Ref_Colors -> color_code, color_description. Ref_Product_Categories -> product_category_code, product_category_desc...
count the products that have the color description 'white' or have the characteristic name 'hot'.
products_gen_characteristics
select count(*) from products as t1 join product_characteristics as t2 on t1.product_id = t2.product_id join characteristics as t3 on t2.characteristic_id = t3.characteristic_id join ref_colors as t4 on t1.color_code = t4.color_code where t4.color_description = 'white' or t3.characteristic_name = 'hot'
Question: how many products have their color described as 'white' or have a characteristic with the name 'hot'? | Tables: Ref_Characteristic_Types -> characteristic_type_code, characteristic_type_description. Ref_Colors -> color_code, color_description. Ref_Product_Categories -> product_category_code, product_category_...
how many products have their color described as 'white' or have a characteristic with the name 'hot'?
products_gen_characteristics
select unit_of_measure from ref_product_categories where product_category_code = 'herbs'
Question: what is the unit of measuerment of the product category code 'herbs'? | Tables: Ref_Characteristic_Types -> characteristic_type_code, characteristic_type_description. Ref_Colors -> color_code, color_description. Ref_Product_Categories -> product_category_code, product_category_description, unit_of_measure. Ch...
what is the unit of measuerment of the product category code 'herbs'?
products_gen_characteristics
select unit_of_measure from ref_product_categories where product_category_code = 'herbs'
Question: return the unit of measure for 'herb' products. | Tables: Ref_Characteristic_Types -> characteristic_type_code, characteristic_type_description. Ref_Colors -> color_code, color_description. Ref_Product_Categories -> product_category_code, product_category_description, unit_of_measure. Characteristics -> chara...
return the unit of measure for 'herb' products.
products_gen_characteristics
select product_category_description from ref_product_categories where product_category_code = 'spices'
Question: find the product category description of the product category with code 'spices'. | Tables: Ref_Characteristic_Types -> characteristic_type_code, characteristic_type_description. Ref_Colors -> color_code, color_description. Ref_Product_Categories -> product_category_code, product_category_description, unit_of...
find the product category description of the product category with code 'spices'.
products_gen_characteristics
select product_category_description from ref_product_categories where product_category_code = 'spices'
Question: what is the description of the product category with the code 'spices'? | Tables: Ref_Characteristic_Types -> characteristic_type_code, characteristic_type_description. Ref_Colors -> color_code, color_description. Ref_Product_Categories -> product_category_code, product_category_description, unit_of_measure. ...
what is the description of the product category with the code 'spices'?
products_gen_characteristics
select product_category_description , unit_of_measure from ref_product_categories where product_category_code = 'herbs'
Question: what is the product category description and unit of measurement of category 'herbs'? | Tables: Ref_Characteristic_Types -> characteristic_type_code, characteristic_type_description. Ref_Colors -> color_code, color_description. Ref_Product_Categories -> product_category_code, product_category_description, uni...
what is the product category description and unit of measurement of category 'herbs'?
products_gen_characteristics
select product_category_description , unit_of_measure from ref_product_categories where product_category_code = 'herbs'
Question: return the description and unit of measurement for products in the 'herbs' category. | Tables: Ref_Characteristic_Types -> characteristic_type_code, characteristic_type_description. Ref_Colors -> color_code, color_description. Ref_Product_Categories -> product_category_code, product_category_description, unit...
return the description and unit of measurement for products in the 'herbs' category.
products_gen_characteristics
select t2.unit_of_measure from products as t1 join ref_product_categories as t2 on t1.product_category_code = t2.product_category_code where t1.product_name = 'cumin'
Question: what is the unit of measurement of product named 'cumin'? | Tables: Ref_Characteristic_Types -> characteristic_type_code, characteristic_type_description. Ref_Colors -> color_code, color_description. Ref_Product_Categories -> product_category_code, product_category_description, unit_of_measure. Characteristic...
what is the unit of measurement of product named 'cumin'?
products_gen_characteristics
select t2.unit_of_measure from products as t1 join ref_product_categories as t2 on t1.product_category_code = t2.product_category_code where t1.product_name = 'cumin'
Question: give the unit of measure for the product with the name 'cumin'. | Tables: Ref_Characteristic_Types -> characteristic_type_code, characteristic_type_description. Ref_Colors -> color_code, color_description. Ref_Product_Categories -> product_category_code, product_category_description, unit_of_measure. Characte...
give the unit of measure for the product with the name 'cumin'.
products_gen_characteristics
select t2.unit_of_measure , t2.product_category_code from products as t1 join ref_product_categories as t2 on t1.product_category_code = t2.product_category_code where t1.product_name = 'chervil'
Question: find the unit of measurement and product category code of product named 'chervil'. | Tables: Ref_Characteristic_Types -> characteristic_type_code, characteristic_type_description. Ref_Colors -> color_code, color_description. Ref_Product_Categories -> product_category_code, product_category_description, unit_o...
find the unit of measurement and product category code of product named 'chervil'.
products_gen_characteristics
select t2.unit_of_measure , t2.product_category_code from products as t1 join ref_product_categories as t2 on t1.product_category_code = t2.product_category_code where t1.product_name = 'chervil'
Question: what are the unit of measure and category code for the 'chervil' product? | Tables: Ref_Characteristic_Types -> characteristic_type_code, characteristic_type_description. Ref_Colors -> color_code, color_description. Ref_Product_Categories -> product_category_code, product_category_description, unit_of_measure...
what are the unit of measure and category code for the 'chervil' product?
products_gen_characteristics
select t1.product_name from products as t1 join ref_product_categories as t2 on t1.product_category_code = t2.product_category_code join ref_colors as t3 on t1.color_code = t3.color_code where t3.color_description = 'white' and t2.unit_of_measure != 'handful'
Question: find the product names that are colored 'white' but do not have unit of measurement 'handful'. | Tables: Ref_Characteristic_Types -> characteristic_type_code, characteristic_type_description. Ref_Colors -> color_code, color_description. Ref_Product_Categories -> product_category_code, product_category_descrip...
find the product names that are colored 'white' but do not have unit of measurement 'handful'.
products_gen_characteristics
select t1.product_name from products as t1 join ref_product_categories as t2 on t1.product_category_code = t2.product_category_code join ref_colors as t3 on t1.color_code = t3.color_code where t3.color_description = 'white' and t2.unit_of_measure != 'handful'
Question: what are the names of products that are not 'white' in color and are not measured by the unit 'handful'? | Tables: Ref_Characteristic_Types -> characteristic_type_code, characteristic_type_description. Ref_Colors -> color_code, color_description. Ref_Product_Categories -> product_category_code, product_catego...
what are the names of products that are not 'white' in color and are not measured by the unit 'handful'?
products_gen_characteristics
select t2.color_description from products as t1 join ref_colors as t2 on t1.color_code = t2.color_code group by t2.color_description order by count(*) desc limit 1
Question: what is the description of the color for most products? | Tables: Ref_Characteristic_Types -> characteristic_type_code, characteristic_type_description. Ref_Colors -> color_code, color_description. Ref_Product_Categories -> product_category_code, product_category_description, unit_of_measure. Characteristics ...
what is the description of the color for most products?
products_gen_characteristics
select t2.color_description from products as t1 join ref_colors as t2 on t1.color_code = t2.color_code group by t2.color_description order by count(*) desc limit 1
Question: return the color description that is most common across all products. | Tables: Ref_Characteristic_Types -> characteristic_type_code, characteristic_type_description. Ref_Colors -> color_code, color_description. Ref_Product_Categories -> product_category_code, product_category_description, unit_of_measure. Ch...
return the color description that is most common across all products.
products_gen_characteristics
select t2.color_description from products as t1 join ref_colors as t2 on t1.color_code = t2.color_code group by t2.color_description order by count(*) asc limit 1
Question: what is the description of the color used by least products? | Tables: Ref_Characteristic_Types -> characteristic_type_code, characteristic_type_description. Ref_Colors -> color_code, color_description. Ref_Product_Categories -> product_category_code, product_category_description, unit_of_measure. Characteris...
what is the description of the color used by least products?
products_gen_characteristics
select t2.color_description from products as t1 join ref_colors as t2 on t1.color_code = t2.color_code group by t2.color_description order by count(*) asc limit 1
Question: give the color description that is least common across products. | Tables: Ref_Characteristic_Types -> characteristic_type_code, characteristic_type_description. Ref_Colors -> color_code, color_description. Ref_Product_Categories -> product_category_code, product_category_description, unit_of_measure. Charact...
give the color description that is least common across products.
products_gen_characteristics
select t3.characteristic_name from products as t1 join product_characteristics as t2 on t1.product_id = t2.product_id join characteristics as t3 on t2.characteristic_id = t3.characteristic_id group by t3.characteristic_name order by count(*) desc limit 1
Question: what is the characteristic name used by most number of the products? | Tables: Ref_Characteristic_Types -> characteristic_type_code, characteristic_type_description. Ref_Colors -> color_code, color_description. Ref_Product_Categories -> product_category_code, product_category_description, unit_of_measure. Cha...
what is the characteristic name used by most number of the products?
products_gen_characteristics
select t3.characteristic_name from products as t1 join product_characteristics as t2 on t1.product_id = t2.product_id join characteristics as t3 on t2.characteristic_id = t3.characteristic_id group by t3.characteristic_name order by count(*) desc limit 1
Question: return the name of the characteristic that is most common across all products. | Tables: Ref_Characteristic_Types -> characteristic_type_code, characteristic_type_description. Ref_Colors -> color_code, color_description. Ref_Product_Categories -> product_category_code, product_category_description, unit_of_me...
return the name of the characteristic that is most common across all products.
products_gen_characteristics
select characteristic_name , other_characteristic_details , characteristic_data_type from characteristics except select t1.characteristic_name , t1.other_characteristic_details , t1.characteristic_data_type from characteristics as t1 join product_characteristics as t2 on t1.characteristic_id = t2.characteristic_i...
Question: what are the names, details and data types of the characteristics which are never used by any product? | Tables: Ref_Characteristic_Types -> characteristic_type_code, characteristic_type_description. Ref_Colors -> color_code, color_description. Ref_Product_Categories -> product_category_code, product_category...
what are the names, details and data types of the characteristics which are never used by any product?
products_gen_characteristics
select characteristic_name , other_characteristic_details , characteristic_data_type from characteristics except select t1.characteristic_name , t1.other_characteristic_details , t1.characteristic_data_type from characteristics as t1 join product_characteristics as t2 on t1.characteristic_id = t2.characteristic_i...
Question: give the names, details, and data types of characteristics that are not found in any product. | Tables: Ref_Characteristic_Types -> characteristic_type_code, characteristic_type_description. Ref_Colors -> color_code, color_description. Ref_Product_Categories -> product_category_code, product_category_descript...
give the names, details, and data types of characteristics that are not found in any product.
products_gen_characteristics
select t3.characteristic_name from products as t1 join product_characteristics as t2 on t1.product_id = t2.product_id join characteristics as t3 on t2.characteristic_id = t3.characteristic_id group by t3.characteristic_name having count(*) >= 2
Question: what are characteristic names used at least twice across all products? | Tables: Ref_Characteristic_Types -> characteristic_type_code, characteristic_type_description. Ref_Colors -> color_code, color_description. Ref_Product_Categories -> product_category_code, product_category_description, unit_of_measure. C...
what are characteristic names used at least twice across all products?
products_gen_characteristics
select t3.characteristic_name from products as t1 join product_characteristics as t2 on t1.product_id = t2.product_id join characteristics as t3 on t2.characteristic_id = t3.characteristic_id group by t3.characteristic_name having count(*) >= 2
Question: give the names of characteristics that are in two or more products? | Tables: Ref_Characteristic_Types -> characteristic_type_code, characteristic_type_description. Ref_Colors -> color_code, color_description. Ref_Product_Categories -> product_category_code, product_category_description, unit_of_measure. Char...
give the names of characteristics that are in two or more products?