input
stringlengths
236
16.9k
output
stringlengths
19
805
-- Database schema | Student : StuID [ INT ] primary_key , LName [ TEXT ] , Fname [ TEXT ] , Age [ INT ] , Sex [ TEXT ] , Major [ INT ] , Advisor [ INT ] , city_code [ TEXT ] | Voting_record : StuID [ INT ] Voting_record.StuID = Student.StuID , Registration_Date [ TEXT ] , Election_Cycle [ TEXT ] , President_Vote [ INT...
SELECT Advisor , count(*) FROM STUDENT GROUP BY Advisor;
-- Database schema | Student : StuID [ INT ] primary_key , LName [ TEXT ] , Fname [ TEXT ] , Age [ INT ] , Sex [ TEXT ] , Major [ INT ] , Advisor [ INT ] , city_code [ TEXT ] | Voting_record : StuID [ INT ] Voting_record.StuID = Student.StuID , Registration_Date [ TEXT ] , Election_Cycle [ TEXT ] , President_Vote [ INT...
SELECT Advisor , count(*) FROM STUDENT GROUP BY Advisor;
-- Database schema | Student : StuID [ INT ] primary_key , LName [ TEXT ] , Fname [ TEXT ] , Age [ INT ] , Sex [ TEXT ] , Major [ INT ] , Advisor [ INT ] , city_code [ TEXT ] | Voting_record : StuID [ INT ] Voting_record.StuID = Student.StuID , Registration_Date [ TEXT ] , Election_Cycle [ TEXT ] , President_Vote [ INT...
SELECT Advisor FROM STUDENT GROUP BY Advisor HAVING COUNT(*) > 2;
-- Database schema | Student : StuID [ INT ] primary_key , LName [ TEXT ] , Fname [ TEXT ] , Age [ INT ] , Sex [ TEXT ] , Major [ INT ] , Advisor [ INT ] , city_code [ TEXT ] | Voting_record : StuID [ INT ] Voting_record.StuID = Student.StuID , Registration_Date [ TEXT ] , Election_Cycle [ TEXT ] , President_Vote [ INT...
SELECT Advisor FROM STUDENT GROUP BY Advisor HAVING COUNT(*) > 2;
-- Database schema | Student : StuID [ INT ] primary_key , LName [ TEXT ] , Fname [ TEXT ] , Age [ INT ] , Sex [ TEXT ] , Major [ INT ] , Advisor [ INT ] , city_code [ TEXT ] | Voting_record : StuID [ INT ] Voting_record.StuID = Student.StuID , Registration_Date [ TEXT ] , Election_Cycle [ TEXT ] , President_Vote [ INT...
SELECT Major FROM STUDENT GROUP BY Major HAVING COUNT(*) < 3;
-- Database schema | Student : StuID [ INT ] primary_key , LName [ TEXT ] , Fname [ TEXT ] , Age [ INT ] , Sex [ TEXT ] , Major [ INT ] , Advisor [ INT ] , city_code [ TEXT ] | Voting_record : StuID [ INT ] Voting_record.StuID = Student.StuID , Registration_Date [ TEXT ] , Election_Cycle [ TEXT ] , President_Vote [ INT...
SELECT Major FROM STUDENT GROUP BY Major HAVING COUNT(*) < 3;
-- Database schema | Student : StuID [ INT ] primary_key , LName [ TEXT ] , Fname [ TEXT ] , Age [ INT ] , Sex [ TEXT ] , Major [ INT ] , Advisor [ INT ] , city_code [ TEXT ] | Voting_record : StuID [ INT ] Voting_record.StuID = Student.StuID , Registration_Date [ TEXT ] , Election_Cycle [ TEXT ] , President_Vote [ INT...
SELECT Election_Cycle , count(*) FROM VOTING_RECORD GROUP BY Election_Cycle;
-- Database schema | Student : StuID [ INT ] primary_key , LName [ TEXT ] , Fname [ TEXT ] , Age [ INT ] , Sex [ TEXT ] , Major [ INT ] , Advisor [ INT ] , city_code [ TEXT ] | Voting_record : StuID [ INT ] Voting_record.StuID = Student.StuID , Registration_Date [ TEXT ] , Election_Cycle [ TEXT ] , President_Vote [ INT...
SELECT Election_Cycle , count(*) FROM VOTING_RECORD GROUP BY Election_Cycle;
-- Database schema | Student : StuID [ INT ] primary_key , LName [ TEXT ] , Fname [ TEXT ] , Age [ INT ] , Sex [ TEXT ] , Major [ INT ] , Advisor [ INT ] , city_code [ TEXT ] | Voting_record : StuID [ INT ] Voting_record.StuID = Student.StuID , Registration_Date [ TEXT ] , Election_Cycle [ TEXT ] , President_Vote [ INT...
SELECT Major FROM STUDENT GROUP BY major ORDER BY count(*) DESC LIMIT 1;
-- Database schema | Student : StuID [ INT ] primary_key , LName [ TEXT ] , Fname [ TEXT ] , Age [ INT ] , Sex [ TEXT ] , Major [ INT ] , Advisor [ INT ] , city_code [ TEXT ] | Voting_record : StuID [ INT ] Voting_record.StuID = Student.StuID , Registration_Date [ TEXT ] , Election_Cycle [ TEXT ] , President_Vote [ INT...
SELECT Major FROM STUDENT GROUP BY major ORDER BY count(*) DESC LIMIT 1;
-- Database schema | Student : StuID [ INT ] primary_key , LName [ TEXT ] , Fname [ TEXT ] , Age [ INT ] , Sex [ TEXT ] , Major [ INT ] , Advisor [ INT ] , city_code [ TEXT ] | Voting_record : StuID [ INT ] Voting_record.StuID = Student.StuID , Registration_Date [ TEXT ] , Election_Cycle [ TEXT ] , President_Vote [ INT...
SELECT Major FROM STUDENT WHERE Sex = "F" GROUP BY major ORDER BY count(*) DESC LIMIT 1;
-- Database schema | Student : StuID [ INT ] primary_key , LName [ TEXT ] , Fname [ TEXT ] , Age [ INT ] , Sex [ TEXT ] , Major [ INT ] , Advisor [ INT ] , city_code [ TEXT ] | Voting_record : StuID [ INT ] Voting_record.StuID = Student.StuID , Registration_Date [ TEXT ] , Election_Cycle [ TEXT ] , President_Vote [ INT...
SELECT Major FROM STUDENT WHERE Sex = "F" GROUP BY major ORDER BY count(*) DESC LIMIT 1;
-- Database schema | Student : StuID [ INT ] primary_key , LName [ TEXT ] , Fname [ TEXT ] , Age [ INT ] , Sex [ TEXT ] , Major [ INT ] , Advisor [ INT ] , city_code [ TEXT ] | Voting_record : StuID [ INT ] Voting_record.StuID = Student.StuID , Registration_Date [ TEXT ] , Election_Cycle [ TEXT ] , President_Vote [ INT...
SELECT city_code FROM STUDENT GROUP BY city_code ORDER BY count(*) DESC LIMIT 1;
-- Database schema | Student : StuID [ INT ] primary_key , LName [ TEXT ] , Fname [ TEXT ] , Age [ INT ] , Sex [ TEXT ] , Major [ INT ] , Advisor [ INT ] , city_code [ TEXT ] | Voting_record : StuID [ INT ] Voting_record.StuID = Student.StuID , Registration_Date [ TEXT ] , Election_Cycle [ TEXT ] , President_Vote [ INT...
SELECT city_code FROM STUDENT GROUP BY city_code ORDER BY count(*) DESC LIMIT 1;
-- Database schema | Student : StuID [ INT ] primary_key , LName [ TEXT ] , Fname [ TEXT ] , Age [ INT ] , Sex [ TEXT ] , Major [ INT ] , Advisor [ INT ] , city_code [ TEXT ] | Voting_record : StuID [ INT ] Voting_record.StuID = Student.StuID , Registration_Date [ TEXT ] , Election_Cycle [ TEXT ] , President_Vote [ INT...
SELECT Advisor FROM STUDENT GROUP BY Advisor HAVING count(*) > 2;
-- Database schema | Student : StuID [ INT ] primary_key , LName [ TEXT ] , Fname [ TEXT ] , Age [ INT ] , Sex [ TEXT ] , Major [ INT ] , Advisor [ INT ] , city_code [ TEXT ] | Voting_record : StuID [ INT ] Voting_record.StuID = Student.StuID , Registration_Date [ TEXT ] , Election_Cycle [ TEXT ] , President_Vote [ INT...
SELECT Advisor FROM STUDENT GROUP BY Advisor HAVING count(*) > 2;
-- Database schema | Ref_Characteristic_Types : characteristic_type_code [ TEXT ] primary_key , characteristic_type_description [ TEXT ] | Ref_Colors : color_code [ TEXT ] primary_key , color_description [ TEXT ] | Ref_Product_Categories : product_category_code [ TEXT ] primary_key , product_category_description [ TEXT...
SELECT count(*) FROM products;
-- Database schema | Ref_Characteristic_Types : characteristic_type_code [ TEXT ] primary_key , characteristic_type_description [ TEXT ] | Ref_Colors : color_code [ TEXT ] primary_key , color_description [ TEXT ] | Ref_Product_Categories : product_category_code [ TEXT ] primary_key , product_category_description [ TEXT...
SELECT count(*) FROM products;
-- Database schema | Ref_Characteristic_Types : characteristic_type_code [ TEXT ] primary_key , characteristic_type_description [ TEXT ] | Ref_Colors : color_code [ TEXT ] primary_key , color_description [ TEXT ] | Ref_Product_Categories : product_category_code [ TEXT ] primary_key , product_category_description [ TEXT...
SELECT count(*) FROM ref_colors;
-- Database schema | Ref_Characteristic_Types : characteristic_type_code [ TEXT ] primary_key , characteristic_type_description [ TEXT ] | Ref_Colors : color_code [ TEXT ] primary_key , color_description [ TEXT ] | Ref_Product_Categories : product_category_code [ TEXT ] primary_key , product_category_description [ TEXT...
SELECT count(*) FROM ref_colors;
-- Database schema | Ref_Characteristic_Types : characteristic_type_code [ TEXT ] primary_key , characteristic_type_description [ TEXT ] | Ref_Colors : color_code [ TEXT ] primary_key , color_description [ TEXT ] | Ref_Product_Categories : product_category_code [ TEXT ] primary_key , product_category_description [ TEXT...
SELECT count(*) FROM CHARACTERISTICS;
-- Database schema | Ref_Characteristic_Types : characteristic_type_code [ TEXT ] primary_key , characteristic_type_description [ TEXT ] | Ref_Colors : color_code [ TEXT ] primary_key , color_description [ TEXT ] | Ref_Product_Categories : product_category_code [ TEXT ] primary_key , product_category_description [ TEXT...
SELECT count(*) FROM CHARACTERISTICS;
-- Database schema | Ref_Characteristic_Types : characteristic_type_code [ TEXT ] primary_key , characteristic_type_description [ TEXT ] | Ref_Colors : color_code [ TEXT ] primary_key , color_description [ TEXT ] | Ref_Product_Categories : product_category_code [ TEXT ] primary_key , product_category_description [ TEXT...
SELECT product_name , typical_buying_price FROM products;
-- Database schema | Ref_Characteristic_Types : characteristic_type_code [ TEXT ] primary_key , characteristic_type_description [ TEXT ] | Ref_Colors : color_code [ TEXT ] primary_key , color_description [ TEXT ] | Ref_Product_Categories : product_category_code [ TEXT ] primary_key , product_category_description [ TEXT...
SELECT product_name , typical_buying_price FROM products;
-- Database schema | Ref_Characteristic_Types : characteristic_type_code [ TEXT ] primary_key , characteristic_type_description [ TEXT ] | Ref_Colors : color_code [ TEXT ] primary_key , color_description [ TEXT ] | Ref_Product_Categories : product_category_code [ TEXT ] primary_key , product_category_description [ TEXT...
SELECT color_description FROM ref_colors;
-- Database schema | Ref_Characteristic_Types : characteristic_type_code [ TEXT ] primary_key , characteristic_type_description [ TEXT ] | Ref_Colors : color_code [ TEXT ] primary_key , color_description [ TEXT ] | Ref_Product_Categories : product_category_code [ TEXT ] primary_key , product_category_description [ TEXT...
SELECT color_description FROM ref_colors;
-- Database schema | Ref_Characteristic_Types : characteristic_type_code [ TEXT ] primary_key , characteristic_type_description [ TEXT ] | Ref_Colors : color_code [ TEXT ] primary_key , color_description [ TEXT ] | Ref_Product_Categories : product_category_code [ TEXT ] primary_key , product_category_description [ TEXT...
SELECT DISTINCT characteristic_name FROM CHARACTERISTICS;
-- Database schema | Ref_Characteristic_Types : characteristic_type_code [ TEXT ] primary_key , characteristic_type_description [ TEXT ] | Ref_Colors : color_code [ TEXT ] primary_key , color_description [ TEXT ] | Ref_Product_Categories : product_category_code [ TEXT ] primary_key , product_category_description [ TEXT...
SELECT DISTINCT characteristic_name FROM CHARACTERISTICS;
-- Database schema | Ref_Characteristic_Types : characteristic_type_code [ TEXT ] primary_key , characteristic_type_description [ TEXT ] | Ref_Colors : color_code [ TEXT ] primary_key , color_description [ TEXT ] | Ref_Product_Categories : product_category_code [ TEXT ] primary_key , product_category_description [ TEXT...
SELECT product_name FROM products WHERE product_category_code = "Spices";
-- Database schema | Ref_Characteristic_Types : characteristic_type_code [ TEXT ] primary_key , characteristic_type_description [ TEXT ] | Ref_Colors : color_code [ TEXT ] primary_key , color_description [ TEXT ] | Ref_Product_Categories : product_category_code [ TEXT ] primary_key , product_category_description [ TEXT...
SELECT product_name FROM products WHERE product_category_code = "Spices";
-- Database schema | Ref_Characteristic_Types : characteristic_type_code [ TEXT ] primary_key , characteristic_type_description [ TEXT ] | Ref_Colors : color_code [ TEXT ] primary_key , color_description [ TEXT ] | Ref_Product_Categories : product_category_code [ TEXT ] primary_key , product_category_description [ TEXT...
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";
-- Database schema | Ref_Characteristic_Types : characteristic_type_code [ TEXT ] primary_key , characteristic_type_description [ TEXT ] | Ref_Colors : color_code [ TEXT ] primary_key , color_description [ TEXT ] | Ref_Product_Categories : product_category_code [ TEXT ] primary_key , product_category_description [ TEXT...
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";
-- Database schema | Ref_Characteristic_Types : characteristic_type_code [ TEXT ] primary_key , characteristic_type_description [ TEXT ] | Ref_Colors : color_code [ TEXT ] primary_key , color_description [ TEXT ] | Ref_Product_Categories : product_category_code [ TEXT ] primary_key , product_category_description [ TEXT...
SELECT count(*) FROM products WHERE product_category_code = "Seeds";
-- Database schema | Ref_Characteristic_Types : characteristic_type_code [ TEXT ] primary_key , characteristic_type_description [ TEXT ] | Ref_Colors : color_code [ TEXT ] primary_key , color_description [ TEXT ] | Ref_Product_Categories : product_category_code [ TEXT ] primary_key , product_category_description [ TEXT...
SELECT count(*) FROM products WHERE product_category_code = "Seeds";
-- Database schema | Ref_Characteristic_Types : characteristic_type_code [ TEXT ] primary_key , characteristic_type_description [ TEXT ] | Ref_Colors : color_code [ TEXT ] primary_key , color_description [ TEXT ] | Ref_Product_Categories : product_category_code [ TEXT ] primary_key , product_category_description [ TEXT...
SELECT count(*) FROM products WHERE product_category_code = "Spices" AND typical_buying_price > 1000;
-- Database schema | Ref_Characteristic_Types : characteristic_type_code [ TEXT ] primary_key , characteristic_type_description [ TEXT ] | Ref_Colors : color_code [ TEXT ] primary_key , color_description [ TEXT ] | Ref_Product_Categories : product_category_code [ TEXT ] primary_key , product_category_description [ TEXT...
SELECT count(*) FROM products WHERE product_category_code = "Spices" AND typical_buying_price > 1000;
-- Database schema | Ref_Characteristic_Types : characteristic_type_code [ TEXT ] primary_key , characteristic_type_description [ TEXT ] | Ref_Colors : color_code [ TEXT ] primary_key , color_description [ TEXT ] | Ref_Product_Categories : product_category_code [ TEXT ] primary_key , product_category_description [ TEXT...
SELECT product_category_code , typical_buying_price FROM products WHERE product_name = "cumin";
-- Database schema | Ref_Characteristic_Types : characteristic_type_code [ TEXT ] primary_key , characteristic_type_description [ TEXT ] | Ref_Colors : color_code [ TEXT ] primary_key , color_description [ TEXT ] | Ref_Product_Categories : product_category_code [ TEXT ] primary_key , product_category_description [ TEXT...
SELECT product_category_code , typical_buying_price FROM products WHERE product_name = "cumin";
-- Database schema | Ref_Characteristic_Types : characteristic_type_code [ TEXT ] primary_key , characteristic_type_description [ TEXT ] | Ref_Colors : color_code [ TEXT ] primary_key , color_description [ TEXT ] | Ref_Product_Categories : product_category_code [ TEXT ] primary_key , product_category_description [ TEXT...
SELECT product_category_code FROM products WHERE product_name = "flax";
-- Database schema | Ref_Characteristic_Types : characteristic_type_code [ TEXT ] primary_key , characteristic_type_description [ TEXT ] | Ref_Colors : color_code [ TEXT ] primary_key , color_description [ TEXT ] | Ref_Product_Categories : product_category_code [ TEXT ] primary_key , product_category_description [ TEXT...
SELECT product_category_code FROM products WHERE product_name = "flax";
-- Database schema | Ref_Characteristic_Types : characteristic_type_code [ TEXT ] primary_key , characteristic_type_description [ TEXT ] | Ref_Colors : color_code [ TEXT ] primary_key , color_description [ TEXT ] | Ref_Product_Categories : product_category_code [ TEXT ] primary_key , product_category_description [ TEXT...
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';
-- Database schema | Ref_Characteristic_Types : characteristic_type_code [ TEXT ] primary_key , characteristic_type_description [ TEXT ] | Ref_Colors : color_code [ TEXT ] primary_key , color_description [ TEXT ] | Ref_Product_Categories : product_category_code [ TEXT ] primary_key , product_category_description [ TEXT...
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';
-- Database schema | Ref_Characteristic_Types : characteristic_type_code [ TEXT ] primary_key , characteristic_type_description [ TEXT ] | Ref_Colors : color_code [ TEXT ] primary_key , color_description [ TEXT ] | Ref_Product_Categories : product_category_code [ TEXT ] primary_key , product_category_description [ TEXT...
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%';
-- Database schema | Ref_Characteristic_Types : characteristic_type_code [ TEXT ] primary_key , characteristic_type_description [ TEXT ] | Ref_Colors : color_code [ TEXT ] primary_key , color_description [ TEXT ] | Ref_Product_Categories : product_category_code [ TEXT ] primary_key , product_category_description [ TEXT...
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%';
-- Database schema | Ref_Characteristic_Types : characteristic_type_code [ TEXT ] primary_key , characteristic_type_description [ TEXT ] | Ref_Colors : color_code [ TEXT ] primary_key , color_description [ TEXT ] | Ref_Product_Categories : product_category_code [ TEXT ] primary_key , product_category_description [ TEXT...
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";
-- Database schema | Ref_Characteristic_Types : characteristic_type_code [ TEXT ] primary_key , characteristic_type_description [ TEXT ] | Ref_Colors : color_code [ TEXT ] primary_key , color_description [ TEXT ] | Ref_Product_Categories : product_category_code [ TEXT ] primary_key , product_category_description [ TEXT...
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";
-- Database schema | Ref_Characteristic_Types : characteristic_type_code [ TEXT ] primary_key , characteristic_type_description [ TEXT ] | Ref_Colors : color_code [ TEXT ] primary_key , color_description [ TEXT ] | Ref_Product_Categories : product_category_code [ TEXT ] primary_key , product_category_description [ TEXT...
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";
-- Database schema | Ref_Characteristic_Types : characteristic_type_code [ TEXT ] primary_key , characteristic_type_description [ TEXT ] | Ref_Colors : color_code [ TEXT ] primary_key , color_description [ TEXT ] | Ref_Product_Categories : product_category_code [ TEXT ] primary_key , product_category_description [ TEXT...
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";
-- Database schema | Ref_Characteristic_Types : characteristic_type_code [ TEXT ] primary_key , characteristic_type_description [ TEXT ] | Ref_Colors : color_code [ TEXT ] primary_key , color_description [ TEXT ] | Ref_Product_Categories : product_category_code [ TEXT ] primary_key , product_category_description [ TEXT...
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;
-- Database schema | Ref_Characteristic_Types : characteristic_type_code [ TEXT ] primary_key , characteristic_type_description [ TEXT ] | Ref_Colors : color_code [ TEXT ] primary_key , color_description [ TEXT ] | Ref_Product_Categories : product_category_code [ TEXT ] primary_key , product_category_description [ TEXT...
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;
-- Database schema | Ref_Characteristic_Types : characteristic_type_code [ TEXT ] primary_key , characteristic_type_description [ TEXT ] | Ref_Colors : color_code [ TEXT ] primary_key , color_description [ TEXT ] | Ref_Product_Categories : product_category_code [ TEXT ] primary_key , product_category_description [ TEXT...
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";
-- Database schema | Ref_Characteristic_Types : characteristic_type_code [ TEXT ] primary_key , characteristic_type_description [ TEXT ] | Ref_Colors : color_code [ TEXT ] primary_key , color_description [ TEXT ] | Ref_Product_Categories : product_category_code [ TEXT ] primary_key , product_category_description [ TEXT...
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";
-- Database schema | Ref_Characteristic_Types : characteristic_type_code [ TEXT ] primary_key , characteristic_type_description [ TEXT ] | Ref_Colors : color_code [ TEXT ] primary_key , color_description [ TEXT ] | Ref_Product_Categories : product_category_code [ TEXT ] primary_key , product_category_description [ TEXT...
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";
-- Database schema | Ref_Characteristic_Types : characteristic_type_code [ TEXT ] primary_key , characteristic_type_description [ TEXT ] | Ref_Colors : color_code [ TEXT ] primary_key , color_description [ TEXT ] | Ref_Product_Categories : product_category_code [ TEXT ] primary_key , product_category_description [ TEXT...
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";
-- Database schema | Ref_Characteristic_Types : characteristic_type_code [ TEXT ] primary_key , characteristic_type_description [ TEXT ] | Ref_Colors : color_code [ TEXT ] primary_key , color_description [ TEXT ] | Ref_Product_Categories : product_category_code [ TEXT ] primary_key , product_category_description [ TEXT...
SELECT count(*) FROM products AS t1 JOIN product_characteristics AS t2 ON t1.product_id = t2.product_id WHERE t1.product_name = "sesame";
-- Database schema | Ref_Characteristic_Types : characteristic_type_code [ TEXT ] primary_key , characteristic_type_description [ TEXT ] | Ref_Colors : color_code [ TEXT ] primary_key , color_description [ TEXT ] | Ref_Product_Categories : product_category_code [ TEXT ] primary_key , product_category_description [ TEXT...
SELECT count(*) FROM products AS t1 JOIN product_characteristics AS t2 ON t1.product_id = t2.product_id WHERE t1.product_name = "sesame";
-- Database schema | Ref_Characteristic_Types : characteristic_type_code [ TEXT ] primary_key , characteristic_type_description [ TEXT ] | Ref_Colors : color_code [ TEXT ] primary_key , color_description [ TEXT ] | Ref_Product_Categories : product_category_code [ TEXT ] primary_key , product_category_description [ TEXT...
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";
-- Database schema | Ref_Characteristic_Types : characteristic_type_code [ TEXT ] primary_key , characteristic_type_description [ TEXT ] | Ref_Colors : color_code [ TEXT ] primary_key , color_description [ TEXT ] | Ref_Product_Categories : product_category_code [ TEXT ] primary_key , product_category_description [ TEXT...
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";
-- Database schema | Ref_Characteristic_Types : characteristic_type_code [ TEXT ] primary_key , characteristic_type_description [ TEXT ] | Ref_Colors : color_code [ TEXT ] primary_key , color_description [ TEXT ] | Ref_Product_Categories : product_category_code [ TEXT ] primary_key , product_category_description [ TEXT...
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";
-- Database schema | Ref_Characteristic_Types : characteristic_type_code [ TEXT ] primary_key , characteristic_type_description [ TEXT ] | Ref_Colors : color_code [ TEXT ] primary_key , color_description [ TEXT ] | Ref_Product_Categories : product_category_code [ TEXT ] primary_key , product_category_description [ TEXT...
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";
-- Database schema | Ref_Characteristic_Types : characteristic_type_code [ TEXT ] primary_key , characteristic_type_description [ TEXT ] | Ref_Colors : color_code [ TEXT ] primary_key , color_description [ TEXT ] | Ref_Product_Categories : product_category_code [ TEXT ] primary_key , product_category_description [ TEXT...
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";
-- Database schema | Ref_Characteristic_Types : characteristic_type_code [ TEXT ] primary_key , characteristic_type_description [ TEXT ] | Ref_Colors : color_code [ TEXT ] primary_key , color_description [ TEXT ] | Ref_Product_Categories : product_category_code [ TEXT ] primary_key , product_category_description [ TEXT...
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";
-- Database schema | Ref_Characteristic_Types : characteristic_type_code [ TEXT ] primary_key , characteristic_type_description [ TEXT ] | Ref_Colors : color_code [ TEXT ] primary_key , color_description [ TEXT ] | Ref_Product_Categories : product_category_code [ TEXT ] primary_key , product_category_description [ TEXT...
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";
-- Database schema | Ref_Characteristic_Types : characteristic_type_code [ TEXT ] primary_key , characteristic_type_description [ TEXT ] | Ref_Colors : color_code [ TEXT ] primary_key , color_description [ TEXT ] | Ref_Product_Categories : product_category_code [ TEXT ] primary_key , product_category_description [ TEXT...
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";
-- Database schema | Ref_Characteristic_Types : characteristic_type_code [ TEXT ] primary_key , characteristic_type_description [ TEXT ] | Ref_Colors : color_code [ TEXT ] primary_key , color_description [ TEXT ] | Ref_Product_Categories : product_category_code [ TEXT ] primary_key , product_category_description [ TEXT...
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";
-- Database schema | Ref_Characteristic_Types : characteristic_type_code [ TEXT ] primary_key , characteristic_type_description [ TEXT ] | Ref_Colors : color_code [ TEXT ] primary_key , color_description [ TEXT ] | Ref_Product_Categories : product_category_code [ TEXT ] primary_key , product_category_description [ TEXT...
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";
-- Database schema | Ref_Characteristic_Types : characteristic_type_code [ TEXT ] primary_key , characteristic_type_description [ TEXT ] | Ref_Colors : color_code [ TEXT ] primary_key , color_description [ TEXT ] | Ref_Product_Categories : product_category_code [ TEXT ] primary_key , product_category_description [ TEXT...
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";
-- Database schema | Ref_Characteristic_Types : characteristic_type_code [ TEXT ] primary_key , characteristic_type_description [ TEXT ] | Ref_Colors : color_code [ TEXT ] primary_key , color_description [ TEXT ] | Ref_Product_Categories : product_category_code [ TEXT ] primary_key , product_category_description [ TEXT...
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";
-- Database schema | Ref_Characteristic_Types : characteristic_type_code [ TEXT ] primary_key , characteristic_type_description [ TEXT ] | Ref_Colors : color_code [ TEXT ] primary_key , color_description [ TEXT ] | Ref_Product_Categories : product_category_code [ TEXT ] primary_key , product_category_description [ TEXT...
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";
-- Database schema | Ref_Characteristic_Types : characteristic_type_code [ TEXT ] primary_key , characteristic_type_description [ TEXT ] | Ref_Colors : color_code [ TEXT ] primary_key , color_description [ TEXT ] | Ref_Product_Categories : product_category_code [ TEXT ] primary_key , product_category_description [ TEXT...
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";
-- Database schema | Ref_Characteristic_Types : characteristic_type_code [ TEXT ] primary_key , characteristic_type_description [ TEXT ] | Ref_Colors : color_code [ TEXT ] primary_key , color_description [ TEXT ] | Ref_Product_Categories : product_category_code [ TEXT ] primary_key , product_category_description [ TEXT...
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";
-- Database schema | Ref_Characteristic_Types : characteristic_type_code [ TEXT ] primary_key , characteristic_type_description [ TEXT ] | Ref_Colors : color_code [ TEXT ] primary_key , color_description [ TEXT ] | Ref_Product_Categories : product_category_code [ TEXT ] primary_key , product_category_description [ TEXT...
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";
-- Database schema | Ref_Characteristic_Types : characteristic_type_code [ TEXT ] primary_key , characteristic_type_description [ TEXT ] | Ref_Colors : color_code [ TEXT ] primary_key , color_description [ TEXT ] | Ref_Product_Categories : product_category_code [ TEXT ] primary_key , product_category_description [ TEXT...
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";
-- Database schema | Ref_Characteristic_Types : characteristic_type_code [ TEXT ] primary_key , characteristic_type_description [ TEXT ] | Ref_Colors : color_code [ TEXT ] primary_key , color_description [ TEXT ] | Ref_Product_Categories : product_category_code [ TEXT ] primary_key , product_category_description [ TEXT...
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";
-- Database schema | Ref_Characteristic_Types : characteristic_type_code [ TEXT ] primary_key , characteristic_type_description [ TEXT ] | Ref_Colors : color_code [ TEXT ] primary_key , color_description [ TEXT ] | Ref_Product_Categories : product_category_code [ TEXT ] primary_key , product_category_description [ TEXT...
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";
-- Database schema | Ref_Characteristic_Types : characteristic_type_code [ TEXT ] primary_key , characteristic_type_description [ TEXT ] | Ref_Colors : color_code [ TEXT ] primary_key , color_description [ TEXT ] | Ref_Product_Categories : product_category_code [ TEXT ] primary_key , product_category_description [ TEXT...
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";
-- Database schema | Ref_Characteristic_Types : characteristic_type_code [ TEXT ] primary_key , characteristic_type_description [ TEXT ] | Ref_Colors : color_code [ TEXT ] primary_key , color_description [ TEXT ] | Ref_Product_Categories : product_category_code [ TEXT ] primary_key , product_category_description [ TEXT...
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";
-- Database schema | Ref_Characteristic_Types : characteristic_type_code [ TEXT ] primary_key , characteristic_type_description [ TEXT ] | Ref_Colors : color_code [ TEXT ] primary_key , color_description [ TEXT ] | Ref_Product_Categories : product_category_code [ TEXT ] primary_key , product_category_description [ TEXT...
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";
-- Database schema | Ref_Characteristic_Types : characteristic_type_code [ TEXT ] primary_key , characteristic_type_description [ TEXT ] | Ref_Colors : color_code [ TEXT ] primary_key , color_description [ TEXT ] | Ref_Product_Categories : product_category_code [ TEXT ] primary_key , product_category_description [ TEXT...
SELECT unit_of_measure FROM ref_product_categories WHERE product_category_code = "Herbs";
-- Database schema | Ref_Characteristic_Types : characteristic_type_code [ TEXT ] primary_key , characteristic_type_description [ TEXT ] | Ref_Colors : color_code [ TEXT ] primary_key , color_description [ TEXT ] | Ref_Product_Categories : product_category_code [ TEXT ] primary_key , product_category_description [ TEXT...
SELECT unit_of_measure FROM ref_product_categories WHERE product_category_code = "Herbs";
-- Database schema | Ref_Characteristic_Types : characteristic_type_code [ TEXT ] primary_key , characteristic_type_description [ TEXT ] | Ref_Colors : color_code [ TEXT ] primary_key , color_description [ TEXT ] | Ref_Product_Categories : product_category_code [ TEXT ] primary_key , product_category_description [ TEXT...
SELECT product_category_description FROM ref_product_categories WHERE product_category_code = "Spices";
-- Database schema | Ref_Characteristic_Types : characteristic_type_code [ TEXT ] primary_key , characteristic_type_description [ TEXT ] | Ref_Colors : color_code [ TEXT ] primary_key , color_description [ TEXT ] | Ref_Product_Categories : product_category_code [ TEXT ] primary_key , product_category_description [ TEXT...
SELECT product_category_description FROM ref_product_categories WHERE product_category_code = "Spices";
-- Database schema | Ref_Characteristic_Types : characteristic_type_code [ TEXT ] primary_key , characteristic_type_description [ TEXT ] | Ref_Colors : color_code [ TEXT ] primary_key , color_description [ TEXT ] | Ref_Product_Categories : product_category_code [ TEXT ] primary_key , product_category_description [ TEXT...
SELECT product_category_description , unit_of_measure FROM ref_product_categories WHERE product_category_code = "Herbs";
-- Database schema | Ref_Characteristic_Types : characteristic_type_code [ TEXT ] primary_key , characteristic_type_description [ TEXT ] | Ref_Colors : color_code [ TEXT ] primary_key , color_description [ TEXT ] | Ref_Product_Categories : product_category_code [ TEXT ] primary_key , product_category_description [ TEXT...
SELECT product_category_description , unit_of_measure FROM ref_product_categories WHERE product_category_code = "Herbs";
-- Database schema | Ref_Characteristic_Types : characteristic_type_code [ TEXT ] primary_key , characteristic_type_description [ TEXT ] | Ref_Colors : color_code [ TEXT ] primary_key , color_description [ TEXT ] | Ref_Product_Categories : product_category_code [ TEXT ] primary_key , product_category_description [ TEXT...
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";
-- Database schema | Ref_Characteristic_Types : characteristic_type_code [ TEXT ] primary_key , characteristic_type_description [ TEXT ] | Ref_Colors : color_code [ TEXT ] primary_key , color_description [ TEXT ] | Ref_Product_Categories : product_category_code [ TEXT ] primary_key , product_category_description [ TEXT...
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";
-- Database schema | Ref_Characteristic_Types : characteristic_type_code [ TEXT ] primary_key , characteristic_type_description [ TEXT ] | Ref_Colors : color_code [ TEXT ] primary_key , color_description [ TEXT ] | Ref_Product_Categories : product_category_code [ TEXT ] primary_key , product_category_description [ TEXT...
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";
-- Database schema | Ref_Characteristic_Types : characteristic_type_code [ TEXT ] primary_key , characteristic_type_description [ TEXT ] | Ref_Colors : color_code [ TEXT ] primary_key , color_description [ TEXT ] | Ref_Product_Categories : product_category_code [ TEXT ] primary_key , product_category_description [ TEXT...
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";
-- Database schema | Ref_Characteristic_Types : characteristic_type_code [ TEXT ] primary_key , characteristic_type_description [ TEXT ] | Ref_Colors : color_code [ TEXT ] primary_key , color_description [ TEXT ] | Ref_Product_Categories : product_category_code [ TEXT ] primary_key , product_category_description [ TEXT...
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";
-- Database schema | Ref_Characteristic_Types : characteristic_type_code [ TEXT ] primary_key , characteristic_type_description [ TEXT ] | Ref_Colors : color_code [ TEXT ] primary_key , color_description [ TEXT ] | Ref_Product_Categories : product_category_code [ TEXT ] primary_key , product_category_description [ TEXT...
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";
-- Database schema | Ref_Characteristic_Types : characteristic_type_code [ TEXT ] primary_key , characteristic_type_description [ TEXT ] | Ref_Colors : color_code [ TEXT ] primary_key , color_description [ TEXT ] | Ref_Product_Categories : product_category_code [ TEXT ] primary_key , product_category_description [ TEXT...
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;
-- Database schema | Ref_Characteristic_Types : characteristic_type_code [ TEXT ] primary_key , characteristic_type_description [ TEXT ] | Ref_Colors : color_code [ TEXT ] primary_key , color_description [ TEXT ] | Ref_Product_Categories : product_category_code [ TEXT ] primary_key , product_category_description [ TEXT...
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;
-- Database schema | Ref_Characteristic_Types : characteristic_type_code [ TEXT ] primary_key , characteristic_type_description [ TEXT ] | Ref_Colors : color_code [ TEXT ] primary_key , color_description [ TEXT ] | Ref_Product_Categories : product_category_code [ TEXT ] primary_key , product_category_description [ TEXT...
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;
-- Database schema | Ref_Characteristic_Types : characteristic_type_code [ TEXT ] primary_key , characteristic_type_description [ TEXT ] | Ref_Colors : color_code [ TEXT ] primary_key , color_description [ TEXT ] | Ref_Product_Categories : product_category_code [ TEXT ] primary_key , product_category_description [ TEXT...
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;
-- Database schema | Ref_Characteristic_Types : characteristic_type_code [ TEXT ] primary_key , characteristic_type_description [ TEXT ] | Ref_Colors : color_code [ TEXT ] primary_key , color_description [ TEXT ] | Ref_Product_Categories : product_category_code [ TEXT ] primary_key , product_category_description [ TEXT...
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;
-- Database schema | Ref_Characteristic_Types : characteristic_type_code [ TEXT ] primary_key , characteristic_type_description [ TEXT ] | Ref_Colors : color_code [ TEXT ] primary_key , color_description [ TEXT ] | Ref_Product_Categories : product_category_code [ TEXT ] primary_key , product_category_description [ TEXT...
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;
-- Database schema | Ref_Characteristic_Types : characteristic_type_code [ TEXT ] primary_key , characteristic_type_description [ TEXT ] | Ref_Colors : color_code [ TEXT ] primary_key , color_description [ TEXT ] | Ref_Product_Categories : product_category_code [ TEXT ] primary_key , product_category_description [ TEXT...
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...
-- Database schema | Ref_Characteristic_Types : characteristic_type_code [ TEXT ] primary_key , characteristic_type_description [ TEXT ] | Ref_Colors : color_code [ TEXT ] primary_key , color_description [ TEXT ] | Ref_Product_Categories : product_category_code [ TEXT ] primary_key , product_category_description [ TEXT...
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...
-- Database schema | Ref_Characteristic_Types : characteristic_type_code [ TEXT ] primary_key , characteristic_type_description [ TEXT ] | Ref_Colors : color_code [ TEXT ] primary_key , color_description [ TEXT ] | Ref_Product_Categories : product_category_code [ TEXT ] primary_key , product_category_description [ TEXT...
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;
-- Database schema | Ref_Characteristic_Types : characteristic_type_code [ TEXT ] primary_key , characteristic_type_description [ TEXT ] | Ref_Colors : color_code [ TEXT ] primary_key , color_description [ TEXT ] | Ref_Product_Categories : product_category_code [ TEXT ] primary_key , product_category_description [ TEXT...
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;