query_id
int64 0
7k
| database_id
stringclasses 140
values | table_id
sequencelengths 1
5
| query
stringlengths 16
224
| answer
stringlengths 18
577
| difficulty
stringclasses 4
values |
---|---|---|---|---|---|
5,500 | voter_2 | [
"STUDENT"
] | Which advisors have more than two students? | SELECT Advisor FROM STUDENT GROUP BY Advisor HAVING COUNT(*) > 2 | easy |
5,501 | voter_2 | [
"STUDENT"
] | Report all majors that have less than 3 students. | SELECT Major FROM STUDENT GROUP BY Major HAVING COUNT(*) < 3 | easy |
5,502 | voter_2 | [
"STUDENT"
] | What are the majors only less than three students are studying? | SELECT Major FROM STUDENT GROUP BY Major HAVING COUNT(*) < 3 | easy |
5,503 | voter_2 | [
"VOTING_RECORD"
] | For each election cycle, report the number of voting records. | SELECT Election_Cycle , count(*) FROM VOTING_RECORD GROUP BY Election_Cycle | medium |
5,504 | voter_2 | [
"VOTING_RECORD"
] | Count the number of voting records for each election cycle. | SELECT Election_Cycle , count(*) FROM VOTING_RECORD GROUP BY Election_Cycle | medium |
5,505 | voter_2 | [
"STUDENT"
] | Which major has the most students? | SELECT Major FROM STUDENT GROUP BY major ORDER BY count(*) DESC LIMIT 1 | hard |
5,506 | voter_2 | [
"STUDENT"
] | Find the major that is studied by the largest number of students. | SELECT Major FROM STUDENT GROUP BY major ORDER BY count(*) DESC LIMIT 1 | hard |
5,507 | voter_2 | [
"STUDENT"
] | What is the most common major among female (sex is F) students? | SELECT Major FROM STUDENT WHERE Sex = "F" GROUP BY major ORDER BY count(*) DESC LIMIT 1 | extra |
5,508 | voter_2 | [
"STUDENT"
] | Find the major that is studied by the most female students. | SELECT Major FROM STUDENT WHERE Sex = "F" GROUP BY major ORDER BY count(*) DESC LIMIT 1 | extra |
5,509 | voter_2 | [
"STUDENT"
] | What is the city_code of the city that the most students live in? | SELECT city_code FROM STUDENT GROUP BY city_code ORDER BY count(*) DESC LIMIT 1 | hard |
5,510 | voter_2 | [
"STUDENT"
] | Return the code of the city that has the most students. | SELECT city_code FROM STUDENT GROUP BY city_code ORDER BY count(*) DESC LIMIT 1 | hard |
5,511 | voter_2 | [
"STUDENT"
] | Report the distinct advisors who have more than 2 students. | SELECT Advisor FROM STUDENT GROUP BY Advisor HAVING count(*) > 2 | easy |
5,512 | voter_2 | [
"STUDENT"
] | Which advisors are advising more than 2 students? | SELECT Advisor FROM STUDENT GROUP BY Advisor HAVING count(*) > 2 | easy |
5,513 | products_gen_characteristics | [
"products"
] | How many products are there? | SELECT count(*) FROM products | easy |
5,514 | products_gen_characteristics | [
"products"
] | Count the number of products. | SELECT count(*) FROM products | easy |
5,515 | products_gen_characteristics | [
"ref_colors"
] | How many colors are there? | SELECT count(*) FROM ref_colors | easy |
5,516 | products_gen_characteristics | [
"ref_colors"
] | Count the number of colors. | SELECT count(*) FROM ref_colors | easy |
5,517 | products_gen_characteristics | [
"CHARACTERISTICS"
] | How many characteristics are there? | SELECT count(*) FROM CHARACTERISTICS | easy |
5,518 | products_gen_characteristics | [
"CHARACTERISTICS"
] | Count the number of characteristics. | SELECT count(*) FROM CHARACTERISTICS | easy |
5,519 | products_gen_characteristics | [
"products"
] | What are the names and buying prices of all the products? | SELECT product_name , typical_buying_price FROM products | medium |
5,520 | products_gen_characteristics | [
"products"
] | Return the names and typical buying prices for all products. | SELECT product_name , typical_buying_price FROM products | medium |
5,521 | products_gen_characteristics | [
"ref_colors"
] | List the description of all the colors. | SELECT color_description FROM ref_colors | easy |
5,522 | products_gen_characteristics | [
"ref_colors"
] | What are the descriptions for each color? | SELECT color_description FROM ref_colors | easy |
5,523 | products_gen_characteristics | [
"CHARACTERISTICS"
] | Find the names of all the product characteristics. | SELECT DISTINCT characteristic_name FROM CHARACTERISTICS | easy |
5,524 | products_gen_characteristics | [
"CHARACTERISTICS"
] | What are the different names of the product characteristics? | SELECT DISTINCT characteristic_name FROM CHARACTERISTICS | easy |
5,525 | products_gen_characteristics | [
"products"
] | What are the names of products with category "Spices"? | SELECT product_name FROM products WHERE product_category_code = "Spices" | easy |
5,526 | products_gen_characteristics | [
"products"
] | Return the names of products in the category 'Spices'. | SELECT product_name FROM products WHERE product_category_code = "Spices" | easy |
5,527 | products_gen_characteristics | [
"Ref_colors",
"products"
] | List the names, color descriptions and product descriptions of products with category "Herbs". | 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" | medium |
5,528 | products_gen_characteristics | [
"Ref_colors",
"products"
] | What are the names, color descriptions, and product descriptions for products in the 'Herbs' category? | 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" | medium |
5,529 | products_gen_characteristics | [
"products"
] | How many products are there under the category "Seeds"? | SELECT count(*) FROM products WHERE product_category_code = "Seeds" | easy |
5,530 | products_gen_characteristics | [
"products"
] | Count the number of products in the category 'Seeds'. | SELECT count(*) FROM products WHERE product_category_code = "Seeds" | easy |
5,531 | products_gen_characteristics | [
"products"
] | Find the number of products with category "Spices" and typically sold above 1000. | SELECT count(*) FROM products WHERE product_category_code = "Spices" AND typical_buying_price > 1000 | medium |
5,532 | products_gen_characteristics | [
"products"
] | How many products are in the 'Spices' category and have a typical price of over 1000? | SELECT count(*) FROM products WHERE product_category_code = "Spices" AND typical_buying_price > 1000 | medium |
5,533 | products_gen_characteristics | [
"products"
] | What is the category and typical buying price of the product with name "cumin"? | SELECT product_category_code , typical_buying_price FROM products WHERE product_name = "cumin" | medium |
5,534 | products_gen_characteristics | [
"products"
] | Return the category code and typical price of 'cumin'. | SELECT product_category_code , typical_buying_price FROM products WHERE product_name = "cumin" | medium |
5,535 | products_gen_characteristics | [
"products"
] | Which category does the product named "flax" belong to? | SELECT product_category_code FROM products WHERE product_name = "flax" | easy |
5,536 | products_gen_characteristics | [
"products"
] | What is the code of the category that the product with the name 'flax' belongs to? | SELECT product_category_code FROM products WHERE product_name = "flax" | easy |
5,537 | products_gen_characteristics | [
"ref_colors",
"products"
] | What is the name of the product with the color description 'yellow'? | 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' | medium |
5,538 | products_gen_characteristics | [
"ref_colors",
"products"
] | Give the name of the products that have a color description 'yellow'. | 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' | medium |
5,539 | products_gen_characteristics | [
"products",
"ref_product_categories"
] | Find the category descriptions of the products whose descriptions include letter 't'. | 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%' | hard |
5,540 | products_gen_characteristics | [
"products",
"ref_product_categories"
] | What are the descriptions of the categories that products with product descriptions that contain the letter t are in? | 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%' | hard |
5,541 | products_gen_characteristics | [
"ref_colors",
"products"
] | What is the color description of the product with name "catnip"? | 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" | medium |
5,542 | products_gen_characteristics | [
"ref_colors",
"products"
] | Give the color description for the product 'catnip'. | 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" | medium |
5,543 | products_gen_characteristics | [
"ref_colors",
"products"
] | What is the color code and description of the product named "chervil"? | 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" | medium |
5,544 | products_gen_characteristics | [
"ref_colors",
"products"
] | Return the color code and description for the product with the name 'chervil'. | 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" | medium |
5,545 | products_gen_characteristics | [
"ref_colors",
"products",
"product_characteristics"
] | Find the id and color description of the products with at least 2 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 | hard |
5,546 | products_gen_characteristics | [
"ref_colors",
"products",
"product_characteristics"
] | What are the product ids and color descriptions for products with two or more 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 | hard |
5,547 | products_gen_characteristics | [
"ref_colors",
"products"
] | List all the product names with the color description "white". | 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" | medium |
5,548 | products_gen_characteristics | [
"ref_colors",
"products"
] | What are the names of products with 'white' as their color description? | 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" | medium |
5,549 | products_gen_characteristics | [
"ref_colors",
"products"
] | What are the name and typical buying and selling prices of the products that have color described as "yellow"? | 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" | medium |
5,550 | products_gen_characteristics | [
"ref_colors",
"products"
] | Return the names and typical buying and selling prices for products that have 'yellow' as their color description. | 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" | medium |
5,551 | products_gen_characteristics | [
"products",
"product_characteristics"
] | How many characteristics does the product named "sesame" have? | SELECT count(*) FROM products AS t1 JOIN product_characteristics AS t2 ON t1.product_id = t2.product_id WHERE t1.product_name = "sesame" | medium |
5,552 | products_gen_characteristics | [
"products",
"product_characteristics"
] | Count the number of characteristics the product 'sesame' has. | SELECT count(*) FROM products AS t1 JOIN product_characteristics AS t2 ON t1.product_id = t2.product_id WHERE t1.product_name = "sesame" | medium |
5,553 | products_gen_characteristics | [
"CHARACTERISTICS",
"products",
"product_characteristics"
] | How many distinct characteristic names does the product "cumin" have? | 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" | hard |
5,554 | products_gen_characteristics | [
"CHARACTERISTICS",
"products",
"product_characteristics"
] | Count the number of different characteristic names the product 'cumin' has. | 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" | hard |
5,555 | products_gen_characteristics | [
"CHARACTERISTICS",
"products",
"product_characteristics"
] | What are all the characteristic names of product "sesame"? | 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" | hard |
5,556 | products_gen_characteristics | [
"CHARACTERISTICS",
"products",
"product_characteristics"
] | Return the characteristic names of the 'sesame' product. | 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" | hard |
5,557 | products_gen_characteristics | [
"CHARACTERISTICS",
"products",
"product_characteristics"
] | List all the characteristic names and data types of product "cumin". | 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" | hard |
5,558 | products_gen_characteristics | [
"CHARACTERISTICS",
"products",
"product_characteristics"
] | What are the names and data types of the characteristics of the 'cumin' product? | 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" | hard |
5,559 | products_gen_characteristics | [
"CHARACTERISTICS",
"products",
"product_characteristics"
] | List all characteristics of product named "sesame" with type code "Grade". | 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" | hard |
5,560 | products_gen_characteristics | [
"CHARACTERISTICS",
"products",
"product_characteristics"
] | What are the names of the characteristics of the product 'sesame' that have the characteristic type code 'Grade'? | 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" | hard |
5,561 | products_gen_characteristics | [
"CHARACTERISTICS",
"products",
"product_characteristics"
] | How many characteristics does the product named "laurel" have? | 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" | hard |
5,562 | products_gen_characteristics | [
"CHARACTERISTICS",
"products",
"product_characteristics"
] | Count the number of characteristics of the product named 'laurel'. | 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" | hard |
5,563 | products_gen_characteristics | [
"CHARACTERISTICS",
"products",
"product_characteristics"
] | Find the number of characteristics that the product "flax" has. | 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" | hard |
5,564 | products_gen_characteristics | [
"CHARACTERISTICS",
"products",
"product_characteristics"
] | Count the number of characteristics of the 'flax' product. | 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" | hard |
5,565 | products_gen_characteristics | [
"CHARACTERISTICS",
"products",
"product_characteristics",
"ref_colors"
] | Find the name of the products that have the color description "red" and have the characteristic name "fast". | 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" | extra |
5,566 | products_gen_characteristics | [
"CHARACTERISTICS",
"products",
"product_characteristics",
"ref_colors"
] | What are the names of the products that have a color description of 'red' and the 'fast' characteristic? | 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" | extra |
5,567 | products_gen_characteristics | [
"CHARACTERISTICS",
"products",
"product_characteristics"
] | How many products have the characteristic named "hot"? | 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" | hard |
5,568 | products_gen_characteristics | [
"CHARACTERISTICS",
"products",
"product_characteristics"
] | Count the number of products with the 'hot' charactersitic. | 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" | hard |
5,569 | products_gen_characteristics | [
"CHARACTERISTICS",
"products",
"product_characteristics"
] | List the all the distinct names of the products with the characteristic name 'warm'. | 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" | hard |
5,570 | products_gen_characteristics | [
"CHARACTERISTICS",
"products",
"product_characteristics"
] | What are the different product names for products that have the 'warm' characteristic:? | 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" | hard |
5,571 | products_gen_characteristics | [
"CHARACTERISTICS",
"products",
"product_characteristics",
"ref_colors"
] | Find the number of the products that have their color described as "red" and have a characteristic named "slow". | 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" | extra |
5,572 | products_gen_characteristics | [
"CHARACTERISTICS",
"products",
"product_characteristics",
"ref_colors"
] | How many products have the color description 'red' and the characteristic name 'slow'? | 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" | extra |
5,573 | products_gen_characteristics | [
"CHARACTERISTICS",
"products",
"product_characteristics",
"ref_colors"
] | Count the products that have the color description "white" or have the characteristic name "hot". | 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" | extra |
5,574 | products_gen_characteristics | [
"CHARACTERISTICS",
"products",
"product_characteristics",
"ref_colors"
] | How many products have their color described as 'white' or have a characteristic with the name 'hot'? | 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" | extra |
5,575 | products_gen_characteristics | [
"ref_product_categories"
] | What is the unit of measuerment of the product category code "Herbs"? | SELECT unit_of_measure FROM ref_product_categories WHERE product_category_code = "Herbs" | easy |
5,576 | products_gen_characteristics | [
"ref_product_categories"
] | Return the unit of measure for 'Herb' products. | SELECT unit_of_measure FROM ref_product_categories WHERE product_category_code = "Herbs" | easy |
5,577 | products_gen_characteristics | [
"ref_product_categories"
] | Find the product category description of the product category with code "Spices". | SELECT product_category_description FROM ref_product_categories WHERE product_category_code = "Spices" | easy |
5,578 | products_gen_characteristics | [
"ref_product_categories"
] | What is the description of the product category with the code 'Spices'? | SELECT product_category_description FROM ref_product_categories WHERE product_category_code = "Spices" | easy |
5,579 | products_gen_characteristics | [
"ref_product_categories"
] | What is the product category description and unit of measurement of category "Herbs"? | SELECT product_category_description , unit_of_measure FROM ref_product_categories WHERE product_category_code = "Herbs" | medium |
5,580 | products_gen_characteristics | [
"ref_product_categories"
] | Return the description and unit of measurement for products in the 'Herbs' category. | SELECT product_category_description , unit_of_measure FROM ref_product_categories WHERE product_category_code = "Herbs" | medium |
5,581 | products_gen_characteristics | [
"products",
"ref_product_categories"
] | What is the unit of measurement of product named "cumin"? | 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" | medium |
5,582 | products_gen_characteristics | [
"products",
"ref_product_categories"
] | Give the unit of measure for the product with the name 'cumin'. | 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" | medium |
5,583 | products_gen_characteristics | [
"products",
"ref_product_categories"
] | Find the unit of measurement and product category code of product named "chervil". | 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" | medium |
5,584 | products_gen_characteristics | [
"products",
"ref_product_categories"
] | What are the unit of measure and category code for the 'chervil' product? | 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" | medium |
5,585 | products_gen_characteristics | [
"ref_colors",
"products",
"ref_product_categories"
] | Find the product names that are colored 'white' but do not have unit of measurement "Handful". | 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" | hard |
5,586 | products_gen_characteristics | [
"ref_colors",
"products",
"ref_product_categories"
] | What are the names of products that are not 'white' in color and are not measured by the unit 'Handful'? | 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" | hard |
5,587 | products_gen_characteristics | [
"ref_colors",
"products"
] | What is the description of the color for most products? | 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 | extra |
5,588 | products_gen_characteristics | [
"ref_colors",
"products"
] | Return the color description that is most common across all products. | 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 | extra |
5,589 | products_gen_characteristics | [
"ref_colors",
"products"
] | What is the description of the color used by least products? | 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 | extra |
5,590 | products_gen_characteristics | [
"ref_colors",
"products"
] | Give the color description that is least common across products. | 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 | extra |
5,591 | products_gen_characteristics | [
"CHARACTERISTICS",
"products",
"product_characteristics"
] | What is the characteristic name used by most number of the products? | 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 | extra |
5,592 | products_gen_characteristics | [
"CHARACTERISTICS",
"products",
"product_characteristics"
] | Return the name of the characteristic that is most common across all products. | 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 | extra |
5,593 | products_gen_characteristics | [
"CHARACTERISTICS",
"product_characteristics"
] | What are the names, details and data types of the characteristics which are never used by any product? | 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_id | extra |
5,594 | products_gen_characteristics | [
"CHARACTERISTICS",
"product_characteristics"
] | Give the names, details, and data types of characteristics that are not found in any product. | 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_id | extra |
5,595 | products_gen_characteristics | [
"CHARACTERISTICS",
"products",
"product_characteristics"
] | What are characteristic names used at least twice across all products? | 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 | hard |
5,596 | products_gen_characteristics | [
"CHARACTERISTICS",
"products",
"product_characteristics"
] | Give the names of characteristics that are in two or more products? | 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 | hard |
5,597 | products_gen_characteristics | [
"Ref_colors",
"products"
] | How many colors are never used by any product? | SELECT count(*) FROM Ref_colors WHERE color_code NOT IN ( SELECT color_code FROM products ) | extra |
5,598 | products_gen_characteristics | [
"Ref_colors",
"products"
] | Count the number of colors that are not used in any products. | SELECT count(*) FROM Ref_colors WHERE color_code NOT IN ( SELECT color_code FROM products ) | extra |
5,599 | swimming | [
"event"
] | How many events are there? | SELECT count(*) FROM event | easy |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.