input stringlengths 667 7.62k | output stringlengths 41 600 | db_id stringlengths 3 31 | query stringlengths 18 577 | question stringlengths 3 224 | schema stringlengths 177 6.14k | primary_keys stringlengths 16 545 | foreign_keys stringlengths 16 1.48k |
|---|---|---|---|---|---|---|---|
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | voter_2 | Student : stuid (text) , lname (number) , fname (text) , age (text) , sex (number) , major (text) , advisor (number) , city_code (number) | Voting_record : stuid (text) , registration_date (number) , election_cycle (text) , president_vote (text) , vice_president_vote (number) , secretary_vote (text) , treasurer_vote (number) , class_president_vote (number) , class_senator_vote (text);</schema>"
<primary_keys>[Primary Keys]: student : stuid</primary_keys>"
<foreign_keys>[Foreign Keys]: voting_record : class_senator_vote = student : stuid | voting_record : class_president_vote = student : stuid | voting_record : treasurer_vote = student : stuid | voting_record : secretary_vote = student : stuid | voting_record : vice_president_vote = student : stuid | voting_record : president_vote = student : stuid | voting_record : stuid = student : stuid</foreign_keys>"
Answer the following question with a SQL Statement:<question>For each advisor, report the total number of students advised by him or her.</question>
[SQL]:
| <SQL_QUERY>SELECT Advisor , count(*) FROM STUDENT GROUP BY Advisor</SQL_QUERY> | voter_2 | SELECT Advisor , count(*) FROM STUDENT GROUP BY Advisor | For each advisor, report the total number of students advised by him or her. | [Schema (values) (types)]: | voter_2 | Student : stuid (text) , lname (number) , fname (text) , age (text) , sex (number) , major (text) , advisor (number) , city_code (number) | Voting_record : stuid (text) , registration_date (number) , election_cycle (text) , president_vote (text) , vice_president_vote (number) , secretary_vote (text) , treasurer_vote (number) , class_president_vote (number) , class_senator_vote (text); | [Primary Keys]: student : stuid | [Foreign Keys]: voting_record : class_senator_vote = student : stuid | voting_record : class_president_vote = student : stuid | voting_record : treasurer_vote = student : stuid | voting_record : secretary_vote = student : stuid | voting_record : vice_president_vote = student : stuid | voting_record : president_vote = student : stuid | voting_record : stuid = student : stuid |
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | voter_2 | Student : stuid (text) , lname (number) , fname (text) , age (text) , sex (number) , major (text) , advisor (number) , city_code (number) | Voting_record : stuid (text) , registration_date (number) , election_cycle (text) , president_vote (text) , vice_president_vote (number) , secretary_vote (text) , treasurer_vote (number) , class_president_vote (number) , class_senator_vote (text);</schema>"
<primary_keys>[Primary Keys]: student : stuid</primary_keys>"
<foreign_keys>[Foreign Keys]: voting_record : class_senator_vote = student : stuid | voting_record : class_president_vote = student : stuid | voting_record : treasurer_vote = student : stuid | voting_record : secretary_vote = student : stuid | voting_record : vice_president_vote = student : stuid | voting_record : president_vote = student : stuid | voting_record : stuid = student : stuid</foreign_keys>"
Answer the following question with a SQL Statement:<question>How many students does each advisor have?</question>
[SQL]:
| <SQL_QUERY>SELECT Advisor , count(*) FROM STUDENT GROUP BY Advisor</SQL_QUERY> | voter_2 | SELECT Advisor , count(*) FROM STUDENT GROUP BY Advisor | How many students does each advisor have? | [Schema (values) (types)]: | voter_2 | Student : stuid (text) , lname (number) , fname (text) , age (text) , sex (number) , major (text) , advisor (number) , city_code (number) | Voting_record : stuid (text) , registration_date (number) , election_cycle (text) , president_vote (text) , vice_president_vote (number) , secretary_vote (text) , treasurer_vote (number) , class_president_vote (number) , class_senator_vote (text); | [Primary Keys]: student : stuid | [Foreign Keys]: voting_record : class_senator_vote = student : stuid | voting_record : class_president_vote = student : stuid | voting_record : treasurer_vote = student : stuid | voting_record : secretary_vote = student : stuid | voting_record : vice_president_vote = student : stuid | voting_record : president_vote = student : stuid | voting_record : stuid = student : stuid |
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | voter_2 | Student : stuid (text) , lname (number) , fname (text) , age (text) , sex (number) , major (text) , advisor (number) , city_code (number) | Voting_record : stuid (text) , registration_date (number) , election_cycle (text) , president_vote (text) , vice_president_vote (number) , secretary_vote (text) , treasurer_vote (number) , class_president_vote (number) , class_senator_vote (text);</schema>"
<primary_keys>[Primary Keys]: student : stuid</primary_keys>"
<foreign_keys>[Foreign Keys]: voting_record : class_senator_vote = student : stuid | voting_record : class_president_vote = student : stuid | voting_record : treasurer_vote = student : stuid | voting_record : secretary_vote = student : stuid | voting_record : vice_president_vote = student : stuid | voting_record : president_vote = student : stuid | voting_record : stuid = student : stuid</foreign_keys>"
Answer the following question with a SQL Statement:<question>Report all advisors that advise more than 2 students.</question>
[SQL]:
| <SQL_QUERY>SELECT Advisor FROM STUDENT GROUP BY Advisor HAVING COUNT(*) > 2</SQL_QUERY> | voter_2 | SELECT Advisor FROM STUDENT GROUP BY Advisor HAVING COUNT(*) > 2 | Report all advisors that advise more than 2 students. | [Schema (values) (types)]: | voter_2 | Student : stuid (text) , lname (number) , fname (text) , age (text) , sex (number) , major (text) , advisor (number) , city_code (number) | Voting_record : stuid (text) , registration_date (number) , election_cycle (text) , president_vote (text) , vice_president_vote (number) , secretary_vote (text) , treasurer_vote (number) , class_president_vote (number) , class_senator_vote (text); | [Primary Keys]: student : stuid | [Foreign Keys]: voting_record : class_senator_vote = student : stuid | voting_record : class_president_vote = student : stuid | voting_record : treasurer_vote = student : stuid | voting_record : secretary_vote = student : stuid | voting_record : vice_president_vote = student : stuid | voting_record : president_vote = student : stuid | voting_record : stuid = student : stuid |
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | voter_2 | Student : stuid (text) , lname (number) , fname (text) , age (text) , sex (number) , major (text) , advisor (number) , city_code (number) | Voting_record : stuid (text) , registration_date (number) , election_cycle (text) , president_vote (text) , vice_president_vote (number) , secretary_vote (text) , treasurer_vote (number) , class_president_vote (number) , class_senator_vote (text);</schema>"
<primary_keys>[Primary Keys]: student : stuid</primary_keys>"
<foreign_keys>[Foreign Keys]: voting_record : class_senator_vote = student : stuid | voting_record : class_president_vote = student : stuid | voting_record : treasurer_vote = student : stuid | voting_record : secretary_vote = student : stuid | voting_record : vice_president_vote = student : stuid | voting_record : president_vote = student : stuid | voting_record : stuid = student : stuid</foreign_keys>"
Answer the following question with a SQL Statement:<question>Which advisors have more than two students?</question>
[SQL]:
| <SQL_QUERY>SELECT Advisor FROM STUDENT GROUP BY Advisor HAVING COUNT(*) > 2</SQL_QUERY> | voter_2 | SELECT Advisor FROM STUDENT GROUP BY Advisor HAVING COUNT(*) > 2 | Which advisors have more than two students? | [Schema (values) (types)]: | voter_2 | Student : stuid (text) , lname (number) , fname (text) , age (text) , sex (number) , major (text) , advisor (number) , city_code (number) | Voting_record : stuid (text) , registration_date (number) , election_cycle (text) , president_vote (text) , vice_president_vote (number) , secretary_vote (text) , treasurer_vote (number) , class_president_vote (number) , class_senator_vote (text); | [Primary Keys]: student : stuid | [Foreign Keys]: voting_record : class_senator_vote = student : stuid | voting_record : class_president_vote = student : stuid | voting_record : treasurer_vote = student : stuid | voting_record : secretary_vote = student : stuid | voting_record : vice_president_vote = student : stuid | voting_record : president_vote = student : stuid | voting_record : stuid = student : stuid |
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | voter_2 | Student : stuid (text) , lname (number) , fname (text) , age (text) , sex (number) , major (text) , advisor (number) , city_code (number) | Voting_record : stuid (text) , registration_date (number) , election_cycle (text) , president_vote (text) , vice_president_vote (number) , secretary_vote (text) , treasurer_vote (number) , class_president_vote (number) , class_senator_vote (text);</schema>"
<primary_keys>[Primary Keys]: student : stuid</primary_keys>"
<foreign_keys>[Foreign Keys]: voting_record : class_senator_vote = student : stuid | voting_record : class_president_vote = student : stuid | voting_record : treasurer_vote = student : stuid | voting_record : secretary_vote = student : stuid | voting_record : vice_president_vote = student : stuid | voting_record : president_vote = student : stuid | voting_record : stuid = student : stuid</foreign_keys>"
Answer the following question with a SQL Statement:<question>Report all majors that have less than 3 students.</question>
[SQL]:
| <SQL_QUERY>SELECT Major FROM STUDENT GROUP BY Major HAVING COUNT(*) < 3</SQL_QUERY> | voter_2 | SELECT Major FROM STUDENT GROUP BY Major HAVING COUNT(*) < 3 | Report all majors that have less than 3 students. | [Schema (values) (types)]: | voter_2 | Student : stuid (text) , lname (number) , fname (text) , age (text) , sex (number) , major (text) , advisor (number) , city_code (number) | Voting_record : stuid (text) , registration_date (number) , election_cycle (text) , president_vote (text) , vice_president_vote (number) , secretary_vote (text) , treasurer_vote (number) , class_president_vote (number) , class_senator_vote (text); | [Primary Keys]: student : stuid | [Foreign Keys]: voting_record : class_senator_vote = student : stuid | voting_record : class_president_vote = student : stuid | voting_record : treasurer_vote = student : stuid | voting_record : secretary_vote = student : stuid | voting_record : vice_president_vote = student : stuid | voting_record : president_vote = student : stuid | voting_record : stuid = student : stuid |
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | voter_2 | Student : stuid (text) , lname (number) , fname (text) , age (text) , sex (number) , major (text) , advisor (number) , city_code (number) | Voting_record : stuid (text) , registration_date (number) , election_cycle (text) , president_vote (text) , vice_president_vote (number) , secretary_vote (text) , treasurer_vote (number) , class_president_vote (number) , class_senator_vote (text);</schema>"
<primary_keys>[Primary Keys]: student : stuid</primary_keys>"
<foreign_keys>[Foreign Keys]: voting_record : class_senator_vote = student : stuid | voting_record : class_president_vote = student : stuid | voting_record : treasurer_vote = student : stuid | voting_record : secretary_vote = student : stuid | voting_record : vice_president_vote = student : stuid | voting_record : president_vote = student : stuid | voting_record : stuid = student : stuid</foreign_keys>"
Answer the following question with a SQL Statement:<question>What are the majors only less than three students are studying?</question>
[SQL]:
| <SQL_QUERY>SELECT Major FROM STUDENT GROUP BY Major HAVING COUNT(*) < 3</SQL_QUERY> | voter_2 | SELECT Major FROM STUDENT GROUP BY Major HAVING COUNT(*) < 3 | What are the majors only less than three students are studying? | [Schema (values) (types)]: | voter_2 | Student : stuid (text) , lname (number) , fname (text) , age (text) , sex (number) , major (text) , advisor (number) , city_code (number) | Voting_record : stuid (text) , registration_date (number) , election_cycle (text) , president_vote (text) , vice_president_vote (number) , secretary_vote (text) , treasurer_vote (number) , class_president_vote (number) , class_senator_vote (text); | [Primary Keys]: student : stuid | [Foreign Keys]: voting_record : class_senator_vote = student : stuid | voting_record : class_president_vote = student : stuid | voting_record : treasurer_vote = student : stuid | voting_record : secretary_vote = student : stuid | voting_record : vice_president_vote = student : stuid | voting_record : president_vote = student : stuid | voting_record : stuid = student : stuid |
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | voter_2 | Student : stuid (text) , lname (number) , fname (text) , age (text) , sex (number) , major (text) , advisor (number) , city_code (number) | Voting_record : stuid (text) , registration_date (number) , election_cycle (text) , president_vote (text) , vice_president_vote (number) , secretary_vote (text) , treasurer_vote (number) , class_president_vote (number) , class_senator_vote (text);</schema>"
<primary_keys>[Primary Keys]: student : stuid</primary_keys>"
<foreign_keys>[Foreign Keys]: voting_record : class_senator_vote = student : stuid | voting_record : class_president_vote = student : stuid | voting_record : treasurer_vote = student : stuid | voting_record : secretary_vote = student : stuid | voting_record : vice_president_vote = student : stuid | voting_record : president_vote = student : stuid | voting_record : stuid = student : stuid</foreign_keys>"
Answer the following question with a SQL Statement:<question>For each election cycle, report the number of voting records.</question>
[SQL]:
| <SQL_QUERY>SELECT Election_Cycle , count(*) FROM VOTING_RECORD GROUP BY Election_Cycle</SQL_QUERY> | voter_2 | SELECT Election_Cycle , count(*) FROM VOTING_RECORD GROUP BY Election_Cycle | For each election cycle, report the number of voting records. | [Schema (values) (types)]: | voter_2 | Student : stuid (text) , lname (number) , fname (text) , age (text) , sex (number) , major (text) , advisor (number) , city_code (number) | Voting_record : stuid (text) , registration_date (number) , election_cycle (text) , president_vote (text) , vice_president_vote (number) , secretary_vote (text) , treasurer_vote (number) , class_president_vote (number) , class_senator_vote (text); | [Primary Keys]: student : stuid | [Foreign Keys]: voting_record : class_senator_vote = student : stuid | voting_record : class_president_vote = student : stuid | voting_record : treasurer_vote = student : stuid | voting_record : secretary_vote = student : stuid | voting_record : vice_president_vote = student : stuid | voting_record : president_vote = student : stuid | voting_record : stuid = student : stuid |
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | voter_2 | Student : stuid (text) , lname (number) , fname (text) , age (text) , sex (number) , major (text) , advisor (number) , city_code (number) | Voting_record : stuid (text) , registration_date (number) , election_cycle (text) , president_vote (text) , vice_president_vote (number) , secretary_vote (text) , treasurer_vote (number) , class_president_vote (number) , class_senator_vote (text);</schema>"
<primary_keys>[Primary Keys]: student : stuid</primary_keys>"
<foreign_keys>[Foreign Keys]: voting_record : class_senator_vote = student : stuid | voting_record : class_president_vote = student : stuid | voting_record : treasurer_vote = student : stuid | voting_record : secretary_vote = student : stuid | voting_record : vice_president_vote = student : stuid | voting_record : president_vote = student : stuid | voting_record : stuid = student : stuid</foreign_keys>"
Answer the following question with a SQL Statement:<question>Count the number of voting records for each election cycle.</question>
[SQL]:
| <SQL_QUERY>SELECT Election_Cycle , count(*) FROM VOTING_RECORD GROUP BY Election_Cycle</SQL_QUERY> | voter_2 | SELECT Election_Cycle , count(*) FROM VOTING_RECORD GROUP BY Election_Cycle | Count the number of voting records for each election cycle. | [Schema (values) (types)]: | voter_2 | Student : stuid (text) , lname (number) , fname (text) , age (text) , sex (number) , major (text) , advisor (number) , city_code (number) | Voting_record : stuid (text) , registration_date (number) , election_cycle (text) , president_vote (text) , vice_president_vote (number) , secretary_vote (text) , treasurer_vote (number) , class_president_vote (number) , class_senator_vote (text); | [Primary Keys]: student : stuid | [Foreign Keys]: voting_record : class_senator_vote = student : stuid | voting_record : class_president_vote = student : stuid | voting_record : treasurer_vote = student : stuid | voting_record : secretary_vote = student : stuid | voting_record : vice_president_vote = student : stuid | voting_record : president_vote = student : stuid | voting_record : stuid = student : stuid |
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | voter_2 | Student : stuid (text) , lname (number) , fname (text) , age (text) , sex (number) , major (text) , advisor (number) , city_code (number) | Voting_record : stuid (text) , registration_date (number) , election_cycle (text) , president_vote (text) , vice_president_vote (number) , secretary_vote (text) , treasurer_vote (number) , class_president_vote (number) , class_senator_vote (text);</schema>"
<primary_keys>[Primary Keys]: student : stuid</primary_keys>"
<foreign_keys>[Foreign Keys]: voting_record : class_senator_vote = student : stuid | voting_record : class_president_vote = student : stuid | voting_record : treasurer_vote = student : stuid | voting_record : secretary_vote = student : stuid | voting_record : vice_president_vote = student : stuid | voting_record : president_vote = student : stuid | voting_record : stuid = student : stuid</foreign_keys>"
Answer the following question with a SQL Statement:<question>Which major has the most students?</question>
[SQL]:
| <SQL_QUERY>SELECT Major FROM STUDENT GROUP BY major ORDER BY count(*) DESC LIMIT 1</SQL_QUERY> | voter_2 | SELECT Major FROM STUDENT GROUP BY major ORDER BY count(*) DESC LIMIT 1 | Which major has the most students? | [Schema (values) (types)]: | voter_2 | Student : stuid (text) , lname (number) , fname (text) , age (text) , sex (number) , major (text) , advisor (number) , city_code (number) | Voting_record : stuid (text) , registration_date (number) , election_cycle (text) , president_vote (text) , vice_president_vote (number) , secretary_vote (text) , treasurer_vote (number) , class_president_vote (number) , class_senator_vote (text); | [Primary Keys]: student : stuid | [Foreign Keys]: voting_record : class_senator_vote = student : stuid | voting_record : class_president_vote = student : stuid | voting_record : treasurer_vote = student : stuid | voting_record : secretary_vote = student : stuid | voting_record : vice_president_vote = student : stuid | voting_record : president_vote = student : stuid | voting_record : stuid = student : stuid |
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | voter_2 | Student : stuid (text) , lname (number) , fname (text) , age (text) , sex (number) , major (text) , advisor (number) , city_code (number) | Voting_record : stuid (text) , registration_date (number) , election_cycle (text) , president_vote (text) , vice_president_vote (number) , secretary_vote (text) , treasurer_vote (number) , class_president_vote (number) , class_senator_vote (text);</schema>"
<primary_keys>[Primary Keys]: student : stuid</primary_keys>"
<foreign_keys>[Foreign Keys]: voting_record : class_senator_vote = student : stuid | voting_record : class_president_vote = student : stuid | voting_record : treasurer_vote = student : stuid | voting_record : secretary_vote = student : stuid | voting_record : vice_president_vote = student : stuid | voting_record : president_vote = student : stuid | voting_record : stuid = student : stuid</foreign_keys>"
Answer the following question with a SQL Statement:<question>Find the major that is studied by the largest number of students.</question>
[SQL]:
| <SQL_QUERY>SELECT Major FROM STUDENT GROUP BY major ORDER BY count(*) DESC LIMIT 1</SQL_QUERY> | voter_2 | SELECT Major FROM STUDENT GROUP BY major ORDER BY count(*) DESC LIMIT 1 | Find the major that is studied by the largest number of students. | [Schema (values) (types)]: | voter_2 | Student : stuid (text) , lname (number) , fname (text) , age (text) , sex (number) , major (text) , advisor (number) , city_code (number) | Voting_record : stuid (text) , registration_date (number) , election_cycle (text) , president_vote (text) , vice_president_vote (number) , secretary_vote (text) , treasurer_vote (number) , class_president_vote (number) , class_senator_vote (text); | [Primary Keys]: student : stuid | [Foreign Keys]: voting_record : class_senator_vote = student : stuid | voting_record : class_president_vote = student : stuid | voting_record : treasurer_vote = student : stuid | voting_record : secretary_vote = student : stuid | voting_record : vice_president_vote = student : stuid | voting_record : president_vote = student : stuid | voting_record : stuid = student : stuid |
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | voter_2 | Student : stuid (text) , lname (number) , fname (text) , age (text) , sex (number) , major (text) , advisor (number) , city_code (number) | Voting_record : stuid (text) , registration_date (number) , election_cycle (text) , president_vote (text) , vice_president_vote (number) , secretary_vote (text) , treasurer_vote (number) , class_president_vote (number) , class_senator_vote (text);</schema>"
<primary_keys>[Primary Keys]: student : stuid</primary_keys>"
<foreign_keys>[Foreign Keys]: voting_record : class_senator_vote = student : stuid | voting_record : class_president_vote = student : stuid | voting_record : treasurer_vote = student : stuid | voting_record : secretary_vote = student : stuid | voting_record : vice_president_vote = student : stuid | voting_record : president_vote = student : stuid | voting_record : stuid = student : stuid</foreign_keys>"
Answer the following question with a SQL Statement:<question>What is the most common major among female (sex is F) students?</question>
[SQL]:
| <SQL_QUERY>SELECT Major FROM STUDENT WHERE Sex = "F" GROUP BY major ORDER BY count(*) DESC LIMIT 1</SQL_QUERY> | voter_2 | SELECT Major FROM STUDENT WHERE Sex = "F" GROUP BY major ORDER BY count(*) DESC LIMIT 1 | What is the most common major among female (sex is F) students? | [Schema (values) (types)]: | voter_2 | Student : stuid (text) , lname (number) , fname (text) , age (text) , sex (number) , major (text) , advisor (number) , city_code (number) | Voting_record : stuid (text) , registration_date (number) , election_cycle (text) , president_vote (text) , vice_president_vote (number) , secretary_vote (text) , treasurer_vote (number) , class_president_vote (number) , class_senator_vote (text); | [Primary Keys]: student : stuid | [Foreign Keys]: voting_record : class_senator_vote = student : stuid | voting_record : class_president_vote = student : stuid | voting_record : treasurer_vote = student : stuid | voting_record : secretary_vote = student : stuid | voting_record : vice_president_vote = student : stuid | voting_record : president_vote = student : stuid | voting_record : stuid = student : stuid |
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | voter_2 | Student : stuid (text) , lname (number) , fname (text) , age (text) , sex (number) , major (text) , advisor (number) , city_code (number) | Voting_record : stuid (text) , registration_date (number) , election_cycle (text) , president_vote (text) , vice_president_vote (number) , secretary_vote (text) , treasurer_vote (number) , class_president_vote (number) , class_senator_vote (text);</schema>"
<primary_keys>[Primary Keys]: student : stuid</primary_keys>"
<foreign_keys>[Foreign Keys]: voting_record : class_senator_vote = student : stuid | voting_record : class_president_vote = student : stuid | voting_record : treasurer_vote = student : stuid | voting_record : secretary_vote = student : stuid | voting_record : vice_president_vote = student : stuid | voting_record : president_vote = student : stuid | voting_record : stuid = student : stuid</foreign_keys>"
Answer the following question with a SQL Statement:<question>Find the major that is studied by the most female students.</question>
[SQL]:
| <SQL_QUERY>SELECT Major FROM STUDENT WHERE Sex = "F" GROUP BY major ORDER BY count(*) DESC LIMIT 1</SQL_QUERY> | voter_2 | SELECT Major FROM STUDENT WHERE Sex = "F" GROUP BY major ORDER BY count(*) DESC LIMIT 1 | Find the major that is studied by the most female students. | [Schema (values) (types)]: | voter_2 | Student : stuid (text) , lname (number) , fname (text) , age (text) , sex (number) , major (text) , advisor (number) , city_code (number) | Voting_record : stuid (text) , registration_date (number) , election_cycle (text) , president_vote (text) , vice_president_vote (number) , secretary_vote (text) , treasurer_vote (number) , class_president_vote (number) , class_senator_vote (text); | [Primary Keys]: student : stuid | [Foreign Keys]: voting_record : class_senator_vote = student : stuid | voting_record : class_president_vote = student : stuid | voting_record : treasurer_vote = student : stuid | voting_record : secretary_vote = student : stuid | voting_record : vice_president_vote = student : stuid | voting_record : president_vote = student : stuid | voting_record : stuid = student : stuid |
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | voter_2 | Student : stuid (text) , lname (number) , fname (text) , age (text) , sex (number) , major (text) , advisor (number) , city_code (number) | Voting_record : stuid (text) , registration_date (number) , election_cycle (text) , president_vote (text) , vice_president_vote (number) , secretary_vote (text) , treasurer_vote (number) , class_president_vote (number) , class_senator_vote (text);</schema>"
<primary_keys>[Primary Keys]: student : stuid</primary_keys>"
<foreign_keys>[Foreign Keys]: voting_record : class_senator_vote = student : stuid | voting_record : class_president_vote = student : stuid | voting_record : treasurer_vote = student : stuid | voting_record : secretary_vote = student : stuid | voting_record : vice_president_vote = student : stuid | voting_record : president_vote = student : stuid | voting_record : stuid = student : stuid</foreign_keys>"
Answer the following question with a SQL Statement:<question>What is the city_code of the city that the most students live in?</question>
[SQL]:
| <SQL_QUERY>SELECT city_code FROM STUDENT GROUP BY city_code ORDER BY count(*) DESC LIMIT 1</SQL_QUERY> | voter_2 | SELECT city_code FROM STUDENT GROUP BY city_code ORDER BY count(*) DESC LIMIT 1 | What is the city_code of the city that the most students live in? | [Schema (values) (types)]: | voter_2 | Student : stuid (text) , lname (number) , fname (text) , age (text) , sex (number) , major (text) , advisor (number) , city_code (number) | Voting_record : stuid (text) , registration_date (number) , election_cycle (text) , president_vote (text) , vice_president_vote (number) , secretary_vote (text) , treasurer_vote (number) , class_president_vote (number) , class_senator_vote (text); | [Primary Keys]: student : stuid | [Foreign Keys]: voting_record : class_senator_vote = student : stuid | voting_record : class_president_vote = student : stuid | voting_record : treasurer_vote = student : stuid | voting_record : secretary_vote = student : stuid | voting_record : vice_president_vote = student : stuid | voting_record : president_vote = student : stuid | voting_record : stuid = student : stuid |
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | voter_2 | Student : stuid (text) , lname (number) , fname (text) , age (text) , sex (number) , major (text) , advisor (number) , city_code (number) | Voting_record : stuid (text) , registration_date (number) , election_cycle (text) , president_vote (text) , vice_president_vote (number) , secretary_vote (text) , treasurer_vote (number) , class_president_vote (number) , class_senator_vote (text);</schema>"
<primary_keys>[Primary Keys]: student : stuid</primary_keys>"
<foreign_keys>[Foreign Keys]: voting_record : class_senator_vote = student : stuid | voting_record : class_president_vote = student : stuid | voting_record : treasurer_vote = student : stuid | voting_record : secretary_vote = student : stuid | voting_record : vice_president_vote = student : stuid | voting_record : president_vote = student : stuid | voting_record : stuid = student : stuid</foreign_keys>"
Answer the following question with a SQL Statement:<question>Return the code of the city that has the most students.</question>
[SQL]:
| <SQL_QUERY>SELECT city_code FROM STUDENT GROUP BY city_code ORDER BY count(*) DESC LIMIT 1</SQL_QUERY> | voter_2 | SELECT city_code FROM STUDENT GROUP BY city_code ORDER BY count(*) DESC LIMIT 1 | Return the code of the city that has the most students. | [Schema (values) (types)]: | voter_2 | Student : stuid (text) , lname (number) , fname (text) , age (text) , sex (number) , major (text) , advisor (number) , city_code (number) | Voting_record : stuid (text) , registration_date (number) , election_cycle (text) , president_vote (text) , vice_president_vote (number) , secretary_vote (text) , treasurer_vote (number) , class_president_vote (number) , class_senator_vote (text); | [Primary Keys]: student : stuid | [Foreign Keys]: voting_record : class_senator_vote = student : stuid | voting_record : class_president_vote = student : stuid | voting_record : treasurer_vote = student : stuid | voting_record : secretary_vote = student : stuid | voting_record : vice_president_vote = student : stuid | voting_record : president_vote = student : stuid | voting_record : stuid = student : stuid |
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | voter_2 | Student : stuid (text) , lname (number) , fname (text) , age (text) , sex (number) , major (text) , advisor (number) , city_code (number) | Voting_record : stuid (text) , registration_date (number) , election_cycle (text) , president_vote (text) , vice_president_vote (number) , secretary_vote (text) , treasurer_vote (number) , class_president_vote (number) , class_senator_vote (text);</schema>"
<primary_keys>[Primary Keys]: student : stuid</primary_keys>"
<foreign_keys>[Foreign Keys]: voting_record : class_senator_vote = student : stuid | voting_record : class_president_vote = student : stuid | voting_record : treasurer_vote = student : stuid | voting_record : secretary_vote = student : stuid | voting_record : vice_president_vote = student : stuid | voting_record : president_vote = student : stuid | voting_record : stuid = student : stuid</foreign_keys>"
Answer the following question with a SQL Statement:<question>Report the distinct advisors who have more than 2 students.</question>
[SQL]:
| <SQL_QUERY>SELECT Advisor FROM STUDENT GROUP BY Advisor HAVING count(*) > 2</SQL_QUERY> | voter_2 | SELECT Advisor FROM STUDENT GROUP BY Advisor HAVING count(*) > 2 | Report the distinct advisors who have more than 2 students. | [Schema (values) (types)]: | voter_2 | Student : stuid (text) , lname (number) , fname (text) , age (text) , sex (number) , major (text) , advisor (number) , city_code (number) | Voting_record : stuid (text) , registration_date (number) , election_cycle (text) , president_vote (text) , vice_president_vote (number) , secretary_vote (text) , treasurer_vote (number) , class_president_vote (number) , class_senator_vote (text); | [Primary Keys]: student : stuid | [Foreign Keys]: voting_record : class_senator_vote = student : stuid | voting_record : class_president_vote = student : stuid | voting_record : treasurer_vote = student : stuid | voting_record : secretary_vote = student : stuid | voting_record : vice_president_vote = student : stuid | voting_record : president_vote = student : stuid | voting_record : stuid = student : stuid |
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | voter_2 | Student : stuid (text) , lname (number) , fname (text) , age (text) , sex (number) , major (text) , advisor (number) , city_code (number) | Voting_record : stuid (text) , registration_date (number) , election_cycle (text) , president_vote (text) , vice_president_vote (number) , secretary_vote (text) , treasurer_vote (number) , class_president_vote (number) , class_senator_vote (text);</schema>"
<primary_keys>[Primary Keys]: student : stuid</primary_keys>"
<foreign_keys>[Foreign Keys]: voting_record : class_senator_vote = student : stuid | voting_record : class_president_vote = student : stuid | voting_record : treasurer_vote = student : stuid | voting_record : secretary_vote = student : stuid | voting_record : vice_president_vote = student : stuid | voting_record : president_vote = student : stuid | voting_record : stuid = student : stuid</foreign_keys>"
Answer the following question with a SQL Statement:<question>Which advisors are advising more than 2 students?</question>
[SQL]:
| <SQL_QUERY>SELECT Advisor FROM STUDENT GROUP BY Advisor HAVING count(*) > 2</SQL_QUERY> | voter_2 | SELECT Advisor FROM STUDENT GROUP BY Advisor HAVING count(*) > 2 | Which advisors are advising more than 2 students? | [Schema (values) (types)]: | voter_2 | Student : stuid (text) , lname (number) , fname (text) , age (text) , sex (number) , major (text) , advisor (number) , city_code (number) | Voting_record : stuid (text) , registration_date (number) , election_cycle (text) , president_vote (text) , vice_president_vote (number) , secretary_vote (text) , treasurer_vote (number) , class_president_vote (number) , class_senator_vote (text); | [Primary Keys]: student : stuid | [Foreign Keys]: voting_record : class_senator_vote = student : stuid | voting_record : class_president_vote = student : stuid | voting_record : treasurer_vote = student : stuid | voting_record : secretary_vote = student : stuid | voting_record : vice_president_vote = student : stuid | voting_record : president_vote = student : stuid | voting_record : stuid = student : stuid |
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | products_gen_characteristics | Ref_Characteristic_Types : characteristic_type_code (text) , characteristic_type_description (text) | Ref_Colors : color_code (text) , color_description (text) | Ref_Product_Categories : product_category_code (text) , product_category_description (text) , unit_of_measure (text) | Characteristics : characteristic_id (text) , characteristic_type_code (text) , characteristic_data_type (text) , characteristic_name (text) , other_characteristic_details (text) | Products : product_id (text) , color_code (text) , product_category_code (text) , product_name (text) , typical_buying_price (text) , typical_selling_price (text) , product_description (text) , other_product_details (text) | Product_Characteristics : product_id (text) , characteristic_id (text) , product_characteristic_value (text);</schema>"
<primary_keys>[Primary Keys]: ref_characteristic_types : characteristic_type_code, ref_colors : color_code, ref_product_categories : product_category_code, characteristics : characteristic_id, products : product_id</primary_keys>"
<foreign_keys>[Foreign Keys]: characteristics : characteristic_type_code = ref_characteristic_types : characteristic_type_code | products : color_code = ref_colors : color_code | products : product_category_code = ref_product_categories : product_category_code | product_characteristics : product_id = products : product_id | product_characteristics : characteristic_id = characteristics : characteristic_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>How many products are there?</question>
[SQL]:
| <SQL_QUERY>SELECT count(*) FROM products</SQL_QUERY> | products_gen_characteristics | SELECT count(*) FROM products | How many products are there? | [Schema (values) (types)]: | products_gen_characteristics | Ref_Characteristic_Types : characteristic_type_code (text) , characteristic_type_description (text) | Ref_Colors : color_code (text) , color_description (text) | Ref_Product_Categories : product_category_code (text) , product_category_description (text) , unit_of_measure (text) | Characteristics : characteristic_id (text) , characteristic_type_code (text) , characteristic_data_type (text) , characteristic_name (text) , other_characteristic_details (text) | Products : product_id (text) , color_code (text) , product_category_code (text) , product_name (text) , typical_buying_price (text) , typical_selling_price (text) , product_description (text) , other_product_details (text) | Product_Characteristics : product_id (text) , characteristic_id (text) , product_characteristic_value (text); | [Primary Keys]: ref_characteristic_types : characteristic_type_code, ref_colors : color_code, ref_product_categories : product_category_code, characteristics : characteristic_id, products : product_id | [Foreign Keys]: characteristics : characteristic_type_code = ref_characteristic_types : characteristic_type_code | products : color_code = ref_colors : color_code | products : product_category_code = ref_product_categories : product_category_code | product_characteristics : product_id = products : product_id | product_characteristics : characteristic_id = characteristics : characteristic_id |
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | products_gen_characteristics | Ref_Characteristic_Types : characteristic_type_code (text) , characteristic_type_description (text) | Ref_Colors : color_code (text) , color_description (text) | Ref_Product_Categories : product_category_code (text) , product_category_description (text) , unit_of_measure (text) | Characteristics : characteristic_id (text) , characteristic_type_code (text) , characteristic_data_type (text) , characteristic_name (text) , other_characteristic_details (text) | Products : product_id (text) , color_code (text) , product_category_code (text) , product_name (text) , typical_buying_price (text) , typical_selling_price (text) , product_description (text) , other_product_details (text) | Product_Characteristics : product_id (text) , characteristic_id (text) , product_characteristic_value (text);</schema>"
<primary_keys>[Primary Keys]: ref_characteristic_types : characteristic_type_code, ref_colors : color_code, ref_product_categories : product_category_code, characteristics : characteristic_id, products : product_id</primary_keys>"
<foreign_keys>[Foreign Keys]: characteristics : characteristic_type_code = ref_characteristic_types : characteristic_type_code | products : color_code = ref_colors : color_code | products : product_category_code = ref_product_categories : product_category_code | product_characteristics : product_id = products : product_id | product_characteristics : characteristic_id = characteristics : characteristic_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>Count the number of products.</question>
[SQL]:
| <SQL_QUERY>SELECT count(*) FROM products</SQL_QUERY> | products_gen_characteristics | SELECT count(*) FROM products | Count the number of products. | [Schema (values) (types)]: | products_gen_characteristics | Ref_Characteristic_Types : characteristic_type_code (text) , characteristic_type_description (text) | Ref_Colors : color_code (text) , color_description (text) | Ref_Product_Categories : product_category_code (text) , product_category_description (text) , unit_of_measure (text) | Characteristics : characteristic_id (text) , characteristic_type_code (text) , characteristic_data_type (text) , characteristic_name (text) , other_characteristic_details (text) | Products : product_id (text) , color_code (text) , product_category_code (text) , product_name (text) , typical_buying_price (text) , typical_selling_price (text) , product_description (text) , other_product_details (text) | Product_Characteristics : product_id (text) , characteristic_id (text) , product_characteristic_value (text); | [Primary Keys]: ref_characteristic_types : characteristic_type_code, ref_colors : color_code, ref_product_categories : product_category_code, characteristics : characteristic_id, products : product_id | [Foreign Keys]: characteristics : characteristic_type_code = ref_characteristic_types : characteristic_type_code | products : color_code = ref_colors : color_code | products : product_category_code = ref_product_categories : product_category_code | product_characteristics : product_id = products : product_id | product_characteristics : characteristic_id = characteristics : characteristic_id |
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | products_gen_characteristics | Ref_Characteristic_Types : characteristic_type_code (text) , characteristic_type_description (text) | Ref_Colors : color_code (text) , color_description (text) | Ref_Product_Categories : product_category_code (text) , product_category_description (text) , unit_of_measure (text) | Characteristics : characteristic_id (text) , characteristic_type_code (text) , characteristic_data_type (text) , characteristic_name (text) , other_characteristic_details (text) | Products : product_id (text) , color_code (text) , product_category_code (text) , product_name (text) , typical_buying_price (text) , typical_selling_price (text) , product_description (text) , other_product_details (text) | Product_Characteristics : product_id (text) , characteristic_id (text) , product_characteristic_value (text);</schema>"
<primary_keys>[Primary Keys]: ref_characteristic_types : characteristic_type_code, ref_colors : color_code, ref_product_categories : product_category_code, characteristics : characteristic_id, products : product_id</primary_keys>"
<foreign_keys>[Foreign Keys]: characteristics : characteristic_type_code = ref_characteristic_types : characteristic_type_code | products : color_code = ref_colors : color_code | products : product_category_code = ref_product_categories : product_category_code | product_characteristics : product_id = products : product_id | product_characteristics : characteristic_id = characteristics : characteristic_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>How many colors are there?</question>
[SQL]:
| <SQL_QUERY>SELECT count(*) FROM ref_colors</SQL_QUERY> | products_gen_characteristics | SELECT count(*) FROM ref_colors | How many colors are there? | [Schema (values) (types)]: | products_gen_characteristics | Ref_Characteristic_Types : characteristic_type_code (text) , characteristic_type_description (text) | Ref_Colors : color_code (text) , color_description (text) | Ref_Product_Categories : product_category_code (text) , product_category_description (text) , unit_of_measure (text) | Characteristics : characteristic_id (text) , characteristic_type_code (text) , characteristic_data_type (text) , characteristic_name (text) , other_characteristic_details (text) | Products : product_id (text) , color_code (text) , product_category_code (text) , product_name (text) , typical_buying_price (text) , typical_selling_price (text) , product_description (text) , other_product_details (text) | Product_Characteristics : product_id (text) , characteristic_id (text) , product_characteristic_value (text); | [Primary Keys]: ref_characteristic_types : characteristic_type_code, ref_colors : color_code, ref_product_categories : product_category_code, characteristics : characteristic_id, products : product_id | [Foreign Keys]: characteristics : characteristic_type_code = ref_characteristic_types : characteristic_type_code | products : color_code = ref_colors : color_code | products : product_category_code = ref_product_categories : product_category_code | product_characteristics : product_id = products : product_id | product_characteristics : characteristic_id = characteristics : characteristic_id |
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | products_gen_characteristics | Ref_Characteristic_Types : characteristic_type_code (text) , characteristic_type_description (text) | Ref_Colors : color_code (text) , color_description (text) | Ref_Product_Categories : product_category_code (text) , product_category_description (text) , unit_of_measure (text) | Characteristics : characteristic_id (text) , characteristic_type_code (text) , characteristic_data_type (text) , characteristic_name (text) , other_characteristic_details (text) | Products : product_id (text) , color_code (text) , product_category_code (text) , product_name (text) , typical_buying_price (text) , typical_selling_price (text) , product_description (text) , other_product_details (text) | Product_Characteristics : product_id (text) , characteristic_id (text) , product_characteristic_value (text);</schema>"
<primary_keys>[Primary Keys]: ref_characteristic_types : characteristic_type_code, ref_colors : color_code, ref_product_categories : product_category_code, characteristics : characteristic_id, products : product_id</primary_keys>"
<foreign_keys>[Foreign Keys]: characteristics : characteristic_type_code = ref_characteristic_types : characteristic_type_code | products : color_code = ref_colors : color_code | products : product_category_code = ref_product_categories : product_category_code | product_characteristics : product_id = products : product_id | product_characteristics : characteristic_id = characteristics : characteristic_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>Count the number of colors.</question>
[SQL]:
| <SQL_QUERY>SELECT count(*) FROM ref_colors</SQL_QUERY> | products_gen_characteristics | SELECT count(*) FROM ref_colors | Count the number of colors. | [Schema (values) (types)]: | products_gen_characteristics | Ref_Characteristic_Types : characteristic_type_code (text) , characteristic_type_description (text) | Ref_Colors : color_code (text) , color_description (text) | Ref_Product_Categories : product_category_code (text) , product_category_description (text) , unit_of_measure (text) | Characteristics : characteristic_id (text) , characteristic_type_code (text) , characteristic_data_type (text) , characteristic_name (text) , other_characteristic_details (text) | Products : product_id (text) , color_code (text) , product_category_code (text) , product_name (text) , typical_buying_price (text) , typical_selling_price (text) , product_description (text) , other_product_details (text) | Product_Characteristics : product_id (text) , characteristic_id (text) , product_characteristic_value (text); | [Primary Keys]: ref_characteristic_types : characteristic_type_code, ref_colors : color_code, ref_product_categories : product_category_code, characteristics : characteristic_id, products : product_id | [Foreign Keys]: characteristics : characteristic_type_code = ref_characteristic_types : characteristic_type_code | products : color_code = ref_colors : color_code | products : product_category_code = ref_product_categories : product_category_code | product_characteristics : product_id = products : product_id | product_characteristics : characteristic_id = characteristics : characteristic_id |
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | products_gen_characteristics | Ref_Characteristic_Types : characteristic_type_code (text) , characteristic_type_description (text) | Ref_Colors : color_code (text) , color_description (text) | Ref_Product_Categories : product_category_code (text) , product_category_description (text) , unit_of_measure (text) | Characteristics : characteristic_id (text) , characteristic_type_code (text) , characteristic_data_type (text) , characteristic_name (text) , other_characteristic_details (text) | Products : product_id (text) , color_code (text) , product_category_code (text) , product_name (text) , typical_buying_price (text) , typical_selling_price (text) , product_description (text) , other_product_details (text) | Product_Characteristics : product_id (text) , characteristic_id (text) , product_characteristic_value (text);</schema>"
<primary_keys>[Primary Keys]: ref_characteristic_types : characteristic_type_code, ref_colors : color_code, ref_product_categories : product_category_code, characteristics : characteristic_id, products : product_id</primary_keys>"
<foreign_keys>[Foreign Keys]: characteristics : characteristic_type_code = ref_characteristic_types : characteristic_type_code | products : color_code = ref_colors : color_code | products : product_category_code = ref_product_categories : product_category_code | product_characteristics : product_id = products : product_id | product_characteristics : characteristic_id = characteristics : characteristic_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>How many characteristics are there?</question>
[SQL]:
| <SQL_QUERY>SELECT count(*) FROM CHARACTERISTICS</SQL_QUERY> | products_gen_characteristics | SELECT count(*) FROM CHARACTERISTICS | How many characteristics are there? | [Schema (values) (types)]: | products_gen_characteristics | Ref_Characteristic_Types : characteristic_type_code (text) , characteristic_type_description (text) | Ref_Colors : color_code (text) , color_description (text) | Ref_Product_Categories : product_category_code (text) , product_category_description (text) , unit_of_measure (text) | Characteristics : characteristic_id (text) , characteristic_type_code (text) , characteristic_data_type (text) , characteristic_name (text) , other_characteristic_details (text) | Products : product_id (text) , color_code (text) , product_category_code (text) , product_name (text) , typical_buying_price (text) , typical_selling_price (text) , product_description (text) , other_product_details (text) | Product_Characteristics : product_id (text) , characteristic_id (text) , product_characteristic_value (text); | [Primary Keys]: ref_characteristic_types : characteristic_type_code, ref_colors : color_code, ref_product_categories : product_category_code, characteristics : characteristic_id, products : product_id | [Foreign Keys]: characteristics : characteristic_type_code = ref_characteristic_types : characteristic_type_code | products : color_code = ref_colors : color_code | products : product_category_code = ref_product_categories : product_category_code | product_characteristics : product_id = products : product_id | product_characteristics : characteristic_id = characteristics : characteristic_id |
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | products_gen_characteristics | Ref_Characteristic_Types : characteristic_type_code (text) , characteristic_type_description (text) | Ref_Colors : color_code (text) , color_description (text) | Ref_Product_Categories : product_category_code (text) , product_category_description (text) , unit_of_measure (text) | Characteristics : characteristic_id (text) , characteristic_type_code (text) , characteristic_data_type (text) , characteristic_name (text) , other_characteristic_details (text) | Products : product_id (text) , color_code (text) , product_category_code (text) , product_name (text) , typical_buying_price (text) , typical_selling_price (text) , product_description (text) , other_product_details (text) | Product_Characteristics : product_id (text) , characteristic_id (text) , product_characteristic_value (text);</schema>"
<primary_keys>[Primary Keys]: ref_characteristic_types : characteristic_type_code, ref_colors : color_code, ref_product_categories : product_category_code, characteristics : characteristic_id, products : product_id</primary_keys>"
<foreign_keys>[Foreign Keys]: characteristics : characteristic_type_code = ref_characteristic_types : characteristic_type_code | products : color_code = ref_colors : color_code | products : product_category_code = ref_product_categories : product_category_code | product_characteristics : product_id = products : product_id | product_characteristics : characteristic_id = characteristics : characteristic_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>Count the number of characteristics.</question>
[SQL]:
| <SQL_QUERY>SELECT count(*) FROM CHARACTERISTICS</SQL_QUERY> | products_gen_characteristics | SELECT count(*) FROM CHARACTERISTICS | Count the number of characteristics. | [Schema (values) (types)]: | products_gen_characteristics | Ref_Characteristic_Types : characteristic_type_code (text) , characteristic_type_description (text) | Ref_Colors : color_code (text) , color_description (text) | Ref_Product_Categories : product_category_code (text) , product_category_description (text) , unit_of_measure (text) | Characteristics : characteristic_id (text) , characteristic_type_code (text) , characteristic_data_type (text) , characteristic_name (text) , other_characteristic_details (text) | Products : product_id (text) , color_code (text) , product_category_code (text) , product_name (text) , typical_buying_price (text) , typical_selling_price (text) , product_description (text) , other_product_details (text) | Product_Characteristics : product_id (text) , characteristic_id (text) , product_characteristic_value (text); | [Primary Keys]: ref_characteristic_types : characteristic_type_code, ref_colors : color_code, ref_product_categories : product_category_code, characteristics : characteristic_id, products : product_id | [Foreign Keys]: characteristics : characteristic_type_code = ref_characteristic_types : characteristic_type_code | products : color_code = ref_colors : color_code | products : product_category_code = ref_product_categories : product_category_code | product_characteristics : product_id = products : product_id | product_characteristics : characteristic_id = characteristics : characteristic_id |
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | products_gen_characteristics | Ref_Characteristic_Types : characteristic_type_code (text) , characteristic_type_description (text) | Ref_Colors : color_code (text) , color_description (text) | Ref_Product_Categories : product_category_code (text) , product_category_description (text) , unit_of_measure (text) | Characteristics : characteristic_id (text) , characteristic_type_code (text) , characteristic_data_type (text) , characteristic_name (text) , other_characteristic_details (text) | Products : product_id (text) , color_code (text) , product_category_code (text) , product_name (text) , typical_buying_price (text) , typical_selling_price (text) , product_description (text) , other_product_details (text) | Product_Characteristics : product_id (text) , characteristic_id (text) , product_characteristic_value (text);</schema>"
<primary_keys>[Primary Keys]: ref_characteristic_types : characteristic_type_code, ref_colors : color_code, ref_product_categories : product_category_code, characteristics : characteristic_id, products : product_id</primary_keys>"
<foreign_keys>[Foreign Keys]: characteristics : characteristic_type_code = ref_characteristic_types : characteristic_type_code | products : color_code = ref_colors : color_code | products : product_category_code = ref_product_categories : product_category_code | product_characteristics : product_id = products : product_id | product_characteristics : characteristic_id = characteristics : characteristic_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>What are the names and buying prices of all the products?</question>
[SQL]:
| <SQL_QUERY>SELECT product_name , typical_buying_price FROM products</SQL_QUERY> | products_gen_characteristics | SELECT product_name , typical_buying_price FROM products | What are the names and buying prices of all the products? | [Schema (values) (types)]: | products_gen_characteristics | Ref_Characteristic_Types : characteristic_type_code (text) , characteristic_type_description (text) | Ref_Colors : color_code (text) , color_description (text) | Ref_Product_Categories : product_category_code (text) , product_category_description (text) , unit_of_measure (text) | Characteristics : characteristic_id (text) , characteristic_type_code (text) , characteristic_data_type (text) , characteristic_name (text) , other_characteristic_details (text) | Products : product_id (text) , color_code (text) , product_category_code (text) , product_name (text) , typical_buying_price (text) , typical_selling_price (text) , product_description (text) , other_product_details (text) | Product_Characteristics : product_id (text) , characteristic_id (text) , product_characteristic_value (text); | [Primary Keys]: ref_characteristic_types : characteristic_type_code, ref_colors : color_code, ref_product_categories : product_category_code, characteristics : characteristic_id, products : product_id | [Foreign Keys]: characteristics : characteristic_type_code = ref_characteristic_types : characteristic_type_code | products : color_code = ref_colors : color_code | products : product_category_code = ref_product_categories : product_category_code | product_characteristics : product_id = products : product_id | product_characteristics : characteristic_id = characteristics : characteristic_id |
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | products_gen_characteristics | Ref_Characteristic_Types : characteristic_type_code (text) , characteristic_type_description (text) | Ref_Colors : color_code (text) , color_description (text) | Ref_Product_Categories : product_category_code (text) , product_category_description (text) , unit_of_measure (text) | Characteristics : characteristic_id (text) , characteristic_type_code (text) , characteristic_data_type (text) , characteristic_name (text) , other_characteristic_details (text) | Products : product_id (text) , color_code (text) , product_category_code (text) , product_name (text) , typical_buying_price (text) , typical_selling_price (text) , product_description (text) , other_product_details (text) | Product_Characteristics : product_id (text) , characteristic_id (text) , product_characteristic_value (text);</schema>"
<primary_keys>[Primary Keys]: ref_characteristic_types : characteristic_type_code, ref_colors : color_code, ref_product_categories : product_category_code, characteristics : characteristic_id, products : product_id</primary_keys>"
<foreign_keys>[Foreign Keys]: characteristics : characteristic_type_code = ref_characteristic_types : characteristic_type_code | products : color_code = ref_colors : color_code | products : product_category_code = ref_product_categories : product_category_code | product_characteristics : product_id = products : product_id | product_characteristics : characteristic_id = characteristics : characteristic_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>Return the names and typical buying prices for all products.</question>
[SQL]:
| <SQL_QUERY>SELECT product_name , typical_buying_price FROM products</SQL_QUERY> | products_gen_characteristics | SELECT product_name , typical_buying_price FROM products | Return the names and typical buying prices for all products. | [Schema (values) (types)]: | products_gen_characteristics | Ref_Characteristic_Types : characteristic_type_code (text) , characteristic_type_description (text) | Ref_Colors : color_code (text) , color_description (text) | Ref_Product_Categories : product_category_code (text) , product_category_description (text) , unit_of_measure (text) | Characteristics : characteristic_id (text) , characteristic_type_code (text) , characteristic_data_type (text) , characteristic_name (text) , other_characteristic_details (text) | Products : product_id (text) , color_code (text) , product_category_code (text) , product_name (text) , typical_buying_price (text) , typical_selling_price (text) , product_description (text) , other_product_details (text) | Product_Characteristics : product_id (text) , characteristic_id (text) , product_characteristic_value (text); | [Primary Keys]: ref_characteristic_types : characteristic_type_code, ref_colors : color_code, ref_product_categories : product_category_code, characteristics : characteristic_id, products : product_id | [Foreign Keys]: characteristics : characteristic_type_code = ref_characteristic_types : characteristic_type_code | products : color_code = ref_colors : color_code | products : product_category_code = ref_product_categories : product_category_code | product_characteristics : product_id = products : product_id | product_characteristics : characteristic_id = characteristics : characteristic_id |
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | products_gen_characteristics | Ref_Characteristic_Types : characteristic_type_code (text) , characteristic_type_description (text) | Ref_Colors : color_code (text) , color_description (text) | Ref_Product_Categories : product_category_code (text) , product_category_description (text) , unit_of_measure (text) | Characteristics : characteristic_id (text) , characteristic_type_code (text) , characteristic_data_type (text) , characteristic_name (text) , other_characteristic_details (text) | Products : product_id (text) , color_code (text) , product_category_code (text) , product_name (text) , typical_buying_price (text) , typical_selling_price (text) , product_description (text) , other_product_details (text) | Product_Characteristics : product_id (text) , characteristic_id (text) , product_characteristic_value (text);</schema>"
<primary_keys>[Primary Keys]: ref_characteristic_types : characteristic_type_code, ref_colors : color_code, ref_product_categories : product_category_code, characteristics : characteristic_id, products : product_id</primary_keys>"
<foreign_keys>[Foreign Keys]: characteristics : characteristic_type_code = ref_characteristic_types : characteristic_type_code | products : color_code = ref_colors : color_code | products : product_category_code = ref_product_categories : product_category_code | product_characteristics : product_id = products : product_id | product_characteristics : characteristic_id = characteristics : characteristic_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>List the description of all the colors.</question>
[SQL]:
| <SQL_QUERY>SELECT color_description FROM ref_colors</SQL_QUERY> | products_gen_characteristics | SELECT color_description FROM ref_colors | List the description of all the colors. | [Schema (values) (types)]: | products_gen_characteristics | Ref_Characteristic_Types : characteristic_type_code (text) , characteristic_type_description (text) | Ref_Colors : color_code (text) , color_description (text) | Ref_Product_Categories : product_category_code (text) , product_category_description (text) , unit_of_measure (text) | Characteristics : characteristic_id (text) , characteristic_type_code (text) , characteristic_data_type (text) , characteristic_name (text) , other_characteristic_details (text) | Products : product_id (text) , color_code (text) , product_category_code (text) , product_name (text) , typical_buying_price (text) , typical_selling_price (text) , product_description (text) , other_product_details (text) | Product_Characteristics : product_id (text) , characteristic_id (text) , product_characteristic_value (text); | [Primary Keys]: ref_characteristic_types : characteristic_type_code, ref_colors : color_code, ref_product_categories : product_category_code, characteristics : characteristic_id, products : product_id | [Foreign Keys]: characteristics : characteristic_type_code = ref_characteristic_types : characteristic_type_code | products : color_code = ref_colors : color_code | products : product_category_code = ref_product_categories : product_category_code | product_characteristics : product_id = products : product_id | product_characteristics : characteristic_id = characteristics : characteristic_id |
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | products_gen_characteristics | Ref_Characteristic_Types : characteristic_type_code (text) , characteristic_type_description (text) | Ref_Colors : color_code (text) , color_description (text) | Ref_Product_Categories : product_category_code (text) , product_category_description (text) , unit_of_measure (text) | Characteristics : characteristic_id (text) , characteristic_type_code (text) , characteristic_data_type (text) , characteristic_name (text) , other_characteristic_details (text) | Products : product_id (text) , color_code (text) , product_category_code (text) , product_name (text) , typical_buying_price (text) , typical_selling_price (text) , product_description (text) , other_product_details (text) | Product_Characteristics : product_id (text) , characteristic_id (text) , product_characteristic_value (text);</schema>"
<primary_keys>[Primary Keys]: ref_characteristic_types : characteristic_type_code, ref_colors : color_code, ref_product_categories : product_category_code, characteristics : characteristic_id, products : product_id</primary_keys>"
<foreign_keys>[Foreign Keys]: characteristics : characteristic_type_code = ref_characteristic_types : characteristic_type_code | products : color_code = ref_colors : color_code | products : product_category_code = ref_product_categories : product_category_code | product_characteristics : product_id = products : product_id | product_characteristics : characteristic_id = characteristics : characteristic_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>What are the descriptions for each color?</question>
[SQL]:
| <SQL_QUERY>SELECT color_description FROM ref_colors</SQL_QUERY> | products_gen_characteristics | SELECT color_description FROM ref_colors | What are the descriptions for each color? | [Schema (values) (types)]: | products_gen_characteristics | Ref_Characteristic_Types : characteristic_type_code (text) , characteristic_type_description (text) | Ref_Colors : color_code (text) , color_description (text) | Ref_Product_Categories : product_category_code (text) , product_category_description (text) , unit_of_measure (text) | Characteristics : characteristic_id (text) , characteristic_type_code (text) , characteristic_data_type (text) , characteristic_name (text) , other_characteristic_details (text) | Products : product_id (text) , color_code (text) , product_category_code (text) , product_name (text) , typical_buying_price (text) , typical_selling_price (text) , product_description (text) , other_product_details (text) | Product_Characteristics : product_id (text) , characteristic_id (text) , product_characteristic_value (text); | [Primary Keys]: ref_characteristic_types : characteristic_type_code, ref_colors : color_code, ref_product_categories : product_category_code, characteristics : characteristic_id, products : product_id | [Foreign Keys]: characteristics : characteristic_type_code = ref_characteristic_types : characteristic_type_code | products : color_code = ref_colors : color_code | products : product_category_code = ref_product_categories : product_category_code | product_characteristics : product_id = products : product_id | product_characteristics : characteristic_id = characteristics : characteristic_id |
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | products_gen_characteristics | Ref_Characteristic_Types : characteristic_type_code (text) , characteristic_type_description (text) | Ref_Colors : color_code (text) , color_description (text) | Ref_Product_Categories : product_category_code (text) , product_category_description (text) , unit_of_measure (text) | Characteristics : characteristic_id (text) , characteristic_type_code (text) , characteristic_data_type (text) , characteristic_name (text) , other_characteristic_details (text) | Products : product_id (text) , color_code (text) , product_category_code (text) , product_name (text) , typical_buying_price (text) , typical_selling_price (text) , product_description (text) , other_product_details (text) | Product_Characteristics : product_id (text) , characteristic_id (text) , product_characteristic_value (text);</schema>"
<primary_keys>[Primary Keys]: ref_characteristic_types : characteristic_type_code, ref_colors : color_code, ref_product_categories : product_category_code, characteristics : characteristic_id, products : product_id</primary_keys>"
<foreign_keys>[Foreign Keys]: characteristics : characteristic_type_code = ref_characteristic_types : characteristic_type_code | products : color_code = ref_colors : color_code | products : product_category_code = ref_product_categories : product_category_code | product_characteristics : product_id = products : product_id | product_characteristics : characteristic_id = characteristics : characteristic_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>Find the names of all the product characteristics.</question>
[SQL]:
| <SQL_QUERY>SELECT DISTINCT characteristic_name FROM CHARACTERISTICS</SQL_QUERY> | products_gen_characteristics | SELECT DISTINCT characteristic_name FROM CHARACTERISTICS | Find the names of all the product characteristics. | [Schema (values) (types)]: | products_gen_characteristics | Ref_Characteristic_Types : characteristic_type_code (text) , characteristic_type_description (text) | Ref_Colors : color_code (text) , color_description (text) | Ref_Product_Categories : product_category_code (text) , product_category_description (text) , unit_of_measure (text) | Characteristics : characteristic_id (text) , characteristic_type_code (text) , characteristic_data_type (text) , characteristic_name (text) , other_characteristic_details (text) | Products : product_id (text) , color_code (text) , product_category_code (text) , product_name (text) , typical_buying_price (text) , typical_selling_price (text) , product_description (text) , other_product_details (text) | Product_Characteristics : product_id (text) , characteristic_id (text) , product_characteristic_value (text); | [Primary Keys]: ref_characteristic_types : characteristic_type_code, ref_colors : color_code, ref_product_categories : product_category_code, characteristics : characteristic_id, products : product_id | [Foreign Keys]: characteristics : characteristic_type_code = ref_characteristic_types : characteristic_type_code | products : color_code = ref_colors : color_code | products : product_category_code = ref_product_categories : product_category_code | product_characteristics : product_id = products : product_id | product_characteristics : characteristic_id = characteristics : characteristic_id |
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | products_gen_characteristics | Ref_Characteristic_Types : characteristic_type_code (text) , characteristic_type_description (text) | Ref_Colors : color_code (text) , color_description (text) | Ref_Product_Categories : product_category_code (text) , product_category_description (text) , unit_of_measure (text) | Characteristics : characteristic_id (text) , characteristic_type_code (text) , characteristic_data_type (text) , characteristic_name (text) , other_characteristic_details (text) | Products : product_id (text) , color_code (text) , product_category_code (text) , product_name (text) , typical_buying_price (text) , typical_selling_price (text) , product_description (text) , other_product_details (text) | Product_Characteristics : product_id (text) , characteristic_id (text) , product_characteristic_value (text);</schema>"
<primary_keys>[Primary Keys]: ref_characteristic_types : characteristic_type_code, ref_colors : color_code, ref_product_categories : product_category_code, characteristics : characteristic_id, products : product_id</primary_keys>"
<foreign_keys>[Foreign Keys]: characteristics : characteristic_type_code = ref_characteristic_types : characteristic_type_code | products : color_code = ref_colors : color_code | products : product_category_code = ref_product_categories : product_category_code | product_characteristics : product_id = products : product_id | product_characteristics : characteristic_id = characteristics : characteristic_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>What are the different names of the product characteristics?</question>
[SQL]:
| <SQL_QUERY>SELECT DISTINCT characteristic_name FROM CHARACTERISTICS</SQL_QUERY> | products_gen_characteristics | SELECT DISTINCT characteristic_name FROM CHARACTERISTICS | What are the different names of the product characteristics? | [Schema (values) (types)]: | products_gen_characteristics | Ref_Characteristic_Types : characteristic_type_code (text) , characteristic_type_description (text) | Ref_Colors : color_code (text) , color_description (text) | Ref_Product_Categories : product_category_code (text) , product_category_description (text) , unit_of_measure (text) | Characteristics : characteristic_id (text) , characteristic_type_code (text) , characteristic_data_type (text) , characteristic_name (text) , other_characteristic_details (text) | Products : product_id (text) , color_code (text) , product_category_code (text) , product_name (text) , typical_buying_price (text) , typical_selling_price (text) , product_description (text) , other_product_details (text) | Product_Characteristics : product_id (text) , characteristic_id (text) , product_characteristic_value (text); | [Primary Keys]: ref_characteristic_types : characteristic_type_code, ref_colors : color_code, ref_product_categories : product_category_code, characteristics : characteristic_id, products : product_id | [Foreign Keys]: characteristics : characteristic_type_code = ref_characteristic_types : characteristic_type_code | products : color_code = ref_colors : color_code | products : product_category_code = ref_product_categories : product_category_code | product_characteristics : product_id = products : product_id | product_characteristics : characteristic_id = characteristics : characteristic_id |
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | products_gen_characteristics | Ref_Characteristic_Types : characteristic_type_code (text) , characteristic_type_description (text) | Ref_Colors : color_code (text) , color_description (text) | Ref_Product_Categories : product_category_code (text) , product_category_description (text) , unit_of_measure (text) | Characteristics : characteristic_id (text) , characteristic_type_code (text) , characteristic_data_type (text) , characteristic_name (text) , other_characteristic_details (text) | Products : product_id (text) , color_code (text) , product_category_code (text) , product_name (text) , typical_buying_price (text) , typical_selling_price (text) , product_description (text) , other_product_details (text) | Product_Characteristics : product_id (text) , characteristic_id (text) , product_characteristic_value (text);</schema>"
<primary_keys>[Primary Keys]: ref_characteristic_types : characteristic_type_code, ref_colors : color_code, ref_product_categories : product_category_code, characteristics : characteristic_id, products : product_id</primary_keys>"
<foreign_keys>[Foreign Keys]: characteristics : characteristic_type_code = ref_characteristic_types : characteristic_type_code | products : color_code = ref_colors : color_code | products : product_category_code = ref_product_categories : product_category_code | product_characteristics : product_id = products : product_id | product_characteristics : characteristic_id = characteristics : characteristic_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>What are the names of products with category "Spices"?</question>
[SQL]:
| <SQL_QUERY>SELECT product_name FROM products WHERE product_category_code = "Spices"</SQL_QUERY> | products_gen_characteristics | SELECT product_name FROM products WHERE product_category_code = "Spices" | What are the names of products with category "Spices"? | [Schema (values) (types)]: | products_gen_characteristics | Ref_Characteristic_Types : characteristic_type_code (text) , characteristic_type_description (text) | Ref_Colors : color_code (text) , color_description (text) | Ref_Product_Categories : product_category_code (text) , product_category_description (text) , unit_of_measure (text) | Characteristics : characteristic_id (text) , characteristic_type_code (text) , characteristic_data_type (text) , characteristic_name (text) , other_characteristic_details (text) | Products : product_id (text) , color_code (text) , product_category_code (text) , product_name (text) , typical_buying_price (text) , typical_selling_price (text) , product_description (text) , other_product_details (text) | Product_Characteristics : product_id (text) , characteristic_id (text) , product_characteristic_value (text); | [Primary Keys]: ref_characteristic_types : characteristic_type_code, ref_colors : color_code, ref_product_categories : product_category_code, characteristics : characteristic_id, products : product_id | [Foreign Keys]: characteristics : characteristic_type_code = ref_characteristic_types : characteristic_type_code | products : color_code = ref_colors : color_code | products : product_category_code = ref_product_categories : product_category_code | product_characteristics : product_id = products : product_id | product_characteristics : characteristic_id = characteristics : characteristic_id |
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | products_gen_characteristics | Ref_Characteristic_Types : characteristic_type_code (text) , characteristic_type_description (text) | Ref_Colors : color_code (text) , color_description (text) | Ref_Product_Categories : product_category_code (text) , product_category_description (text) , unit_of_measure (text) | Characteristics : characteristic_id (text) , characteristic_type_code (text) , characteristic_data_type (text) , characteristic_name (text) , other_characteristic_details (text) | Products : product_id (text) , color_code (text) , product_category_code (text) , product_name (text) , typical_buying_price (text) , typical_selling_price (text) , product_description (text) , other_product_details (text) | Product_Characteristics : product_id (text) , characteristic_id (text) , product_characteristic_value (text);</schema>"
<primary_keys>[Primary Keys]: ref_characteristic_types : characteristic_type_code, ref_colors : color_code, ref_product_categories : product_category_code, characteristics : characteristic_id, products : product_id</primary_keys>"
<foreign_keys>[Foreign Keys]: characteristics : characteristic_type_code = ref_characteristic_types : characteristic_type_code | products : color_code = ref_colors : color_code | products : product_category_code = ref_product_categories : product_category_code | product_characteristics : product_id = products : product_id | product_characteristics : characteristic_id = characteristics : characteristic_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>Return the names of products in the category 'Spices'.</question>
[SQL]:
| <SQL_QUERY>SELECT product_name FROM products WHERE product_category_code = "Spices"</SQL_QUERY> | products_gen_characteristics | SELECT product_name FROM products WHERE product_category_code = "Spices" | Return the names of products in the category 'Spices'. | [Schema (values) (types)]: | products_gen_characteristics | Ref_Characteristic_Types : characteristic_type_code (text) , characteristic_type_description (text) | Ref_Colors : color_code (text) , color_description (text) | Ref_Product_Categories : product_category_code (text) , product_category_description (text) , unit_of_measure (text) | Characteristics : characteristic_id (text) , characteristic_type_code (text) , characteristic_data_type (text) , characteristic_name (text) , other_characteristic_details (text) | Products : product_id (text) , color_code (text) , product_category_code (text) , product_name (text) , typical_buying_price (text) , typical_selling_price (text) , product_description (text) , other_product_details (text) | Product_Characteristics : product_id (text) , characteristic_id (text) , product_characteristic_value (text); | [Primary Keys]: ref_characteristic_types : characteristic_type_code, ref_colors : color_code, ref_product_categories : product_category_code, characteristics : characteristic_id, products : product_id | [Foreign Keys]: characteristics : characteristic_type_code = ref_characteristic_types : characteristic_type_code | products : color_code = ref_colors : color_code | products : product_category_code = ref_product_categories : product_category_code | product_characteristics : product_id = products : product_id | product_characteristics : characteristic_id = characteristics : characteristic_id |
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | products_gen_characteristics | Ref_Characteristic_Types : characteristic_type_code (text) , characteristic_type_description (text) | Ref_Colors : color_code (text) , color_description (text) | Ref_Product_Categories : product_category_code (text) , product_category_description (text) , unit_of_measure (text) | Characteristics : characteristic_id (text) , characteristic_type_code (text) , characteristic_data_type (text) , characteristic_name (text) , other_characteristic_details (text) | Products : product_id (text) , color_code (text) , product_category_code (text) , product_name (text) , typical_buying_price (text) , typical_selling_price (text) , product_description (text) , other_product_details (text) | Product_Characteristics : product_id (text) , characteristic_id (text) , product_characteristic_value (text);</schema>"
<primary_keys>[Primary Keys]: ref_characteristic_types : characteristic_type_code, ref_colors : color_code, ref_product_categories : product_category_code, characteristics : characteristic_id, products : product_id</primary_keys>"
<foreign_keys>[Foreign Keys]: characteristics : characteristic_type_code = ref_characteristic_types : characteristic_type_code | products : color_code = ref_colors : color_code | products : product_category_code = ref_product_categories : product_category_code | product_characteristics : product_id = products : product_id | product_characteristics : characteristic_id = characteristics : characteristic_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>List the names, color descriptions and product descriptions of products with category "Herbs".</question>
[SQL]:
| <SQL_QUERY>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"</SQL_QUERY> | 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" | List the names, color descriptions and product descriptions of products with category "Herbs". | [Schema (values) (types)]: | products_gen_characteristics | Ref_Characteristic_Types : characteristic_type_code (text) , characteristic_type_description (text) | Ref_Colors : color_code (text) , color_description (text) | Ref_Product_Categories : product_category_code (text) , product_category_description (text) , unit_of_measure (text) | Characteristics : characteristic_id (text) , characteristic_type_code (text) , characteristic_data_type (text) , characteristic_name (text) , other_characteristic_details (text) | Products : product_id (text) , color_code (text) , product_category_code (text) , product_name (text) , typical_buying_price (text) , typical_selling_price (text) , product_description (text) , other_product_details (text) | Product_Characteristics : product_id (text) , characteristic_id (text) , product_characteristic_value (text); | [Primary Keys]: ref_characteristic_types : characteristic_type_code, ref_colors : color_code, ref_product_categories : product_category_code, characteristics : characteristic_id, products : product_id | [Foreign Keys]: characteristics : characteristic_type_code = ref_characteristic_types : characteristic_type_code | products : color_code = ref_colors : color_code | products : product_category_code = ref_product_categories : product_category_code | product_characteristics : product_id = products : product_id | product_characteristics : characteristic_id = characteristics : characteristic_id |
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | products_gen_characteristics | Ref_Characteristic_Types : characteristic_type_code (text) , characteristic_type_description (text) | Ref_Colors : color_code (text) , color_description (text) | Ref_Product_Categories : product_category_code (text) , product_category_description (text) , unit_of_measure (text) | Characteristics : characteristic_id (text) , characteristic_type_code (text) , characteristic_data_type (text) , characteristic_name (text) , other_characteristic_details (text) | Products : product_id (text) , color_code (text) , product_category_code (text) , product_name (text) , typical_buying_price (text) , typical_selling_price (text) , product_description (text) , other_product_details (text) | Product_Characteristics : product_id (text) , characteristic_id (text) , product_characteristic_value (text);</schema>"
<primary_keys>[Primary Keys]: ref_characteristic_types : characteristic_type_code, ref_colors : color_code, ref_product_categories : product_category_code, characteristics : characteristic_id, products : product_id</primary_keys>"
<foreign_keys>[Foreign Keys]: characteristics : characteristic_type_code = ref_characteristic_types : characteristic_type_code | products : color_code = ref_colors : color_code | products : product_category_code = ref_product_categories : product_category_code | product_characteristics : product_id = products : product_id | product_characteristics : characteristic_id = characteristics : characteristic_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>What are the names, color descriptions, and product descriptions for products in the 'Herbs' category?</question>
[SQL]:
| <SQL_QUERY>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"</SQL_QUERY> | 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" | What are the names, color descriptions, and product descriptions for products in the 'Herbs' category? | [Schema (values) (types)]: | products_gen_characteristics | Ref_Characteristic_Types : characteristic_type_code (text) , characteristic_type_description (text) | Ref_Colors : color_code (text) , color_description (text) | Ref_Product_Categories : product_category_code (text) , product_category_description (text) , unit_of_measure (text) | Characteristics : characteristic_id (text) , characteristic_type_code (text) , characteristic_data_type (text) , characteristic_name (text) , other_characteristic_details (text) | Products : product_id (text) , color_code (text) , product_category_code (text) , product_name (text) , typical_buying_price (text) , typical_selling_price (text) , product_description (text) , other_product_details (text) | Product_Characteristics : product_id (text) , characteristic_id (text) , product_characteristic_value (text); | [Primary Keys]: ref_characteristic_types : characteristic_type_code, ref_colors : color_code, ref_product_categories : product_category_code, characteristics : characteristic_id, products : product_id | [Foreign Keys]: characteristics : characteristic_type_code = ref_characteristic_types : characteristic_type_code | products : color_code = ref_colors : color_code | products : product_category_code = ref_product_categories : product_category_code | product_characteristics : product_id = products : product_id | product_characteristics : characteristic_id = characteristics : characteristic_id |
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | products_gen_characteristics | Ref_Characteristic_Types : characteristic_type_code (text) , characteristic_type_description (text) | Ref_Colors : color_code (text) , color_description (text) | Ref_Product_Categories : product_category_code (text) , product_category_description (text) , unit_of_measure (text) | Characteristics : characteristic_id (text) , characteristic_type_code (text) , characteristic_data_type (text) , characteristic_name (text) , other_characteristic_details (text) | Products : product_id (text) , color_code (text) , product_category_code (text) , product_name (text) , typical_buying_price (text) , typical_selling_price (text) , product_description (text) , other_product_details (text) | Product_Characteristics : product_id (text) , characteristic_id (text) , product_characteristic_value (text);</schema>"
<primary_keys>[Primary Keys]: ref_characteristic_types : characteristic_type_code, ref_colors : color_code, ref_product_categories : product_category_code, characteristics : characteristic_id, products : product_id</primary_keys>"
<foreign_keys>[Foreign Keys]: characteristics : characteristic_type_code = ref_characteristic_types : characteristic_type_code | products : color_code = ref_colors : color_code | products : product_category_code = ref_product_categories : product_category_code | product_characteristics : product_id = products : product_id | product_characteristics : characteristic_id = characteristics : characteristic_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>How many products are there under the category "Seeds"?</question>
[SQL]:
| <SQL_QUERY>SELECT count(*) FROM products WHERE product_category_code = "Seeds"</SQL_QUERY> | products_gen_characteristics | SELECT count(*) FROM products WHERE product_category_code = "Seeds" | How many products are there under the category "Seeds"? | [Schema (values) (types)]: | products_gen_characteristics | Ref_Characteristic_Types : characteristic_type_code (text) , characteristic_type_description (text) | Ref_Colors : color_code (text) , color_description (text) | Ref_Product_Categories : product_category_code (text) , product_category_description (text) , unit_of_measure (text) | Characteristics : characteristic_id (text) , characteristic_type_code (text) , characteristic_data_type (text) , characteristic_name (text) , other_characteristic_details (text) | Products : product_id (text) , color_code (text) , product_category_code (text) , product_name (text) , typical_buying_price (text) , typical_selling_price (text) , product_description (text) , other_product_details (text) | Product_Characteristics : product_id (text) , characteristic_id (text) , product_characteristic_value (text); | [Primary Keys]: ref_characteristic_types : characteristic_type_code, ref_colors : color_code, ref_product_categories : product_category_code, characteristics : characteristic_id, products : product_id | [Foreign Keys]: characteristics : characteristic_type_code = ref_characteristic_types : characteristic_type_code | products : color_code = ref_colors : color_code | products : product_category_code = ref_product_categories : product_category_code | product_characteristics : product_id = products : product_id | product_characteristics : characteristic_id = characteristics : characteristic_id |
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | products_gen_characteristics | Ref_Characteristic_Types : characteristic_type_code (text) , characteristic_type_description (text) | Ref_Colors : color_code (text) , color_description (text) | Ref_Product_Categories : product_category_code (text) , product_category_description (text) , unit_of_measure (text) | Characteristics : characteristic_id (text) , characteristic_type_code (text) , characteristic_data_type (text) , characteristic_name (text) , other_characteristic_details (text) | Products : product_id (text) , color_code (text) , product_category_code (text) , product_name (text) , typical_buying_price (text) , typical_selling_price (text) , product_description (text) , other_product_details (text) | Product_Characteristics : product_id (text) , characteristic_id (text) , product_characteristic_value (text);</schema>"
<primary_keys>[Primary Keys]: ref_characteristic_types : characteristic_type_code, ref_colors : color_code, ref_product_categories : product_category_code, characteristics : characteristic_id, products : product_id</primary_keys>"
<foreign_keys>[Foreign Keys]: characteristics : characteristic_type_code = ref_characteristic_types : characteristic_type_code | products : color_code = ref_colors : color_code | products : product_category_code = ref_product_categories : product_category_code | product_characteristics : product_id = products : product_id | product_characteristics : characteristic_id = characteristics : characteristic_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>Count the number of products in the category 'Seeds'.</question>
[SQL]:
| <SQL_QUERY>SELECT count(*) FROM products WHERE product_category_code = "Seeds"</SQL_QUERY> | products_gen_characteristics | SELECT count(*) FROM products WHERE product_category_code = "Seeds" | Count the number of products in the category 'Seeds'. | [Schema (values) (types)]: | products_gen_characteristics | Ref_Characteristic_Types : characteristic_type_code (text) , characteristic_type_description (text) | Ref_Colors : color_code (text) , color_description (text) | Ref_Product_Categories : product_category_code (text) , product_category_description (text) , unit_of_measure (text) | Characteristics : characteristic_id (text) , characteristic_type_code (text) , characteristic_data_type (text) , characteristic_name (text) , other_characteristic_details (text) | Products : product_id (text) , color_code (text) , product_category_code (text) , product_name (text) , typical_buying_price (text) , typical_selling_price (text) , product_description (text) , other_product_details (text) | Product_Characteristics : product_id (text) , characteristic_id (text) , product_characteristic_value (text); | [Primary Keys]: ref_characteristic_types : characteristic_type_code, ref_colors : color_code, ref_product_categories : product_category_code, characteristics : characteristic_id, products : product_id | [Foreign Keys]: characteristics : characteristic_type_code = ref_characteristic_types : characteristic_type_code | products : color_code = ref_colors : color_code | products : product_category_code = ref_product_categories : product_category_code | product_characteristics : product_id = products : product_id | product_characteristics : characteristic_id = characteristics : characteristic_id |
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | products_gen_characteristics | Ref_Characteristic_Types : characteristic_type_code (text) , characteristic_type_description (text) | Ref_Colors : color_code (text) , color_description (text) | Ref_Product_Categories : product_category_code (text) , product_category_description (text) , unit_of_measure (text) | Characteristics : characteristic_id (text) , characteristic_type_code (text) , characteristic_data_type (text) , characteristic_name (text) , other_characteristic_details (text) | Products : product_id (text) , color_code (text) , product_category_code (text) , product_name (text) , typical_buying_price (text) , typical_selling_price (text) , product_description (text) , other_product_details (text) | Product_Characteristics : product_id (text) , characteristic_id (text) , product_characteristic_value (text);</schema>"
<primary_keys>[Primary Keys]: ref_characteristic_types : characteristic_type_code, ref_colors : color_code, ref_product_categories : product_category_code, characteristics : characteristic_id, products : product_id</primary_keys>"
<foreign_keys>[Foreign Keys]: characteristics : characteristic_type_code = ref_characteristic_types : characteristic_type_code | products : color_code = ref_colors : color_code | products : product_category_code = ref_product_categories : product_category_code | product_characteristics : product_id = products : product_id | product_characteristics : characteristic_id = characteristics : characteristic_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>Find the number of products with category "Spices" and typically sold above 1000.</question>
[SQL]:
| <SQL_QUERY>SELECT count(*) FROM products WHERE product_category_code = "Spices" AND typical_buying_price > 1000</SQL_QUERY> | products_gen_characteristics | SELECT count(*) FROM products WHERE product_category_code = "Spices" AND typical_buying_price > 1000 | Find the number of products with category "Spices" and typically sold above 1000. | [Schema (values) (types)]: | products_gen_characteristics | Ref_Characteristic_Types : characteristic_type_code (text) , characteristic_type_description (text) | Ref_Colors : color_code (text) , color_description (text) | Ref_Product_Categories : product_category_code (text) , product_category_description (text) , unit_of_measure (text) | Characteristics : characteristic_id (text) , characteristic_type_code (text) , characteristic_data_type (text) , characteristic_name (text) , other_characteristic_details (text) | Products : product_id (text) , color_code (text) , product_category_code (text) , product_name (text) , typical_buying_price (text) , typical_selling_price (text) , product_description (text) , other_product_details (text) | Product_Characteristics : product_id (text) , characteristic_id (text) , product_characteristic_value (text); | [Primary Keys]: ref_characteristic_types : characteristic_type_code, ref_colors : color_code, ref_product_categories : product_category_code, characteristics : characteristic_id, products : product_id | [Foreign Keys]: characteristics : characteristic_type_code = ref_characteristic_types : characteristic_type_code | products : color_code = ref_colors : color_code | products : product_category_code = ref_product_categories : product_category_code | product_characteristics : product_id = products : product_id | product_characteristics : characteristic_id = characteristics : characteristic_id |
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | products_gen_characteristics | Ref_Characteristic_Types : characteristic_type_code (text) , characteristic_type_description (text) | Ref_Colors : color_code (text) , color_description (text) | Ref_Product_Categories : product_category_code (text) , product_category_description (text) , unit_of_measure (text) | Characteristics : characteristic_id (text) , characteristic_type_code (text) , characteristic_data_type (text) , characteristic_name (text) , other_characteristic_details (text) | Products : product_id (text) , color_code (text) , product_category_code (text) , product_name (text) , typical_buying_price (text) , typical_selling_price (text) , product_description (text) , other_product_details (text) | Product_Characteristics : product_id (text) , characteristic_id (text) , product_characteristic_value (text);</schema>"
<primary_keys>[Primary Keys]: ref_characteristic_types : characteristic_type_code, ref_colors : color_code, ref_product_categories : product_category_code, characteristics : characteristic_id, products : product_id</primary_keys>"
<foreign_keys>[Foreign Keys]: characteristics : characteristic_type_code = ref_characteristic_types : characteristic_type_code | products : color_code = ref_colors : color_code | products : product_category_code = ref_product_categories : product_category_code | product_characteristics : product_id = products : product_id | product_characteristics : characteristic_id = characteristics : characteristic_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>How many products are in the 'Spices' category and have a typical price of over 1000?</question>
[SQL]:
| <SQL_QUERY>SELECT count(*) FROM products WHERE product_category_code = "Spices" AND typical_buying_price > 1000</SQL_QUERY> | products_gen_characteristics | SELECT count(*) FROM products WHERE product_category_code = "Spices" AND typical_buying_price > 1000 | How many products are in the 'Spices' category and have a typical price of over 1000? | [Schema (values) (types)]: | products_gen_characteristics | Ref_Characteristic_Types : characteristic_type_code (text) , characteristic_type_description (text) | Ref_Colors : color_code (text) , color_description (text) | Ref_Product_Categories : product_category_code (text) , product_category_description (text) , unit_of_measure (text) | Characteristics : characteristic_id (text) , characteristic_type_code (text) , characteristic_data_type (text) , characteristic_name (text) , other_characteristic_details (text) | Products : product_id (text) , color_code (text) , product_category_code (text) , product_name (text) , typical_buying_price (text) , typical_selling_price (text) , product_description (text) , other_product_details (text) | Product_Characteristics : product_id (text) , characteristic_id (text) , product_characteristic_value (text); | [Primary Keys]: ref_characteristic_types : characteristic_type_code, ref_colors : color_code, ref_product_categories : product_category_code, characteristics : characteristic_id, products : product_id | [Foreign Keys]: characteristics : characteristic_type_code = ref_characteristic_types : characteristic_type_code | products : color_code = ref_colors : color_code | products : product_category_code = ref_product_categories : product_category_code | product_characteristics : product_id = products : product_id | product_characteristics : characteristic_id = characteristics : characteristic_id |
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | products_gen_characteristics | Ref_Characteristic_Types : characteristic_type_code (text) , characteristic_type_description (text) | Ref_Colors : color_code (text) , color_description (text) | Ref_Product_Categories : product_category_code (text) , product_category_description (text) , unit_of_measure (text) | Characteristics : characteristic_id (text) , characteristic_type_code (text) , characteristic_data_type (text) , characteristic_name (text) , other_characteristic_details (text) | Products : product_id (text) , color_code (text) , product_category_code (text) , product_name (text) , typical_buying_price (text) , typical_selling_price (text) , product_description (text) , other_product_details (text) | Product_Characteristics : product_id (text) , characteristic_id (text) , product_characteristic_value (text);</schema>"
<primary_keys>[Primary Keys]: ref_characteristic_types : characteristic_type_code, ref_colors : color_code, ref_product_categories : product_category_code, characteristics : characteristic_id, products : product_id</primary_keys>"
<foreign_keys>[Foreign Keys]: characteristics : characteristic_type_code = ref_characteristic_types : characteristic_type_code | products : color_code = ref_colors : color_code | products : product_category_code = ref_product_categories : product_category_code | product_characteristics : product_id = products : product_id | product_characteristics : characteristic_id = characteristics : characteristic_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>What is the category and typical buying price of the product with name "cumin"?</question>
[SQL]:
| <SQL_QUERY>SELECT product_category_code , typical_buying_price FROM products WHERE product_name = "cumin"</SQL_QUERY> | products_gen_characteristics | SELECT product_category_code , typical_buying_price FROM products WHERE product_name = "cumin" | What is the category and typical buying price of the product with name "cumin"? | [Schema (values) (types)]: | products_gen_characteristics | Ref_Characteristic_Types : characteristic_type_code (text) , characteristic_type_description (text) | Ref_Colors : color_code (text) , color_description (text) | Ref_Product_Categories : product_category_code (text) , product_category_description (text) , unit_of_measure (text) | Characteristics : characteristic_id (text) , characteristic_type_code (text) , characteristic_data_type (text) , characteristic_name (text) , other_characteristic_details (text) | Products : product_id (text) , color_code (text) , product_category_code (text) , product_name (text) , typical_buying_price (text) , typical_selling_price (text) , product_description (text) , other_product_details (text) | Product_Characteristics : product_id (text) , characteristic_id (text) , product_characteristic_value (text); | [Primary Keys]: ref_characteristic_types : characteristic_type_code, ref_colors : color_code, ref_product_categories : product_category_code, characteristics : characteristic_id, products : product_id | [Foreign Keys]: characteristics : characteristic_type_code = ref_characteristic_types : characteristic_type_code | products : color_code = ref_colors : color_code | products : product_category_code = ref_product_categories : product_category_code | product_characteristics : product_id = products : product_id | product_characteristics : characteristic_id = characteristics : characteristic_id |
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | products_gen_characteristics | Ref_Characteristic_Types : characteristic_type_code (text) , characteristic_type_description (text) | Ref_Colors : color_code (text) , color_description (text) | Ref_Product_Categories : product_category_code (text) , product_category_description (text) , unit_of_measure (text) | Characteristics : characteristic_id (text) , characteristic_type_code (text) , characteristic_data_type (text) , characteristic_name (text) , other_characteristic_details (text) | Products : product_id (text) , color_code (text) , product_category_code (text) , product_name (text) , typical_buying_price (text) , typical_selling_price (text) , product_description (text) , other_product_details (text) | Product_Characteristics : product_id (text) , characteristic_id (text) , product_characteristic_value (text);</schema>"
<primary_keys>[Primary Keys]: ref_characteristic_types : characteristic_type_code, ref_colors : color_code, ref_product_categories : product_category_code, characteristics : characteristic_id, products : product_id</primary_keys>"
<foreign_keys>[Foreign Keys]: characteristics : characteristic_type_code = ref_characteristic_types : characteristic_type_code | products : color_code = ref_colors : color_code | products : product_category_code = ref_product_categories : product_category_code | product_characteristics : product_id = products : product_id | product_characteristics : characteristic_id = characteristics : characteristic_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>Return the category code and typical price of 'cumin'.</question>
[SQL]:
| <SQL_QUERY>SELECT product_category_code , typical_buying_price FROM products WHERE product_name = "cumin"</SQL_QUERY> | products_gen_characteristics | SELECT product_category_code , typical_buying_price FROM products WHERE product_name = "cumin" | Return the category code and typical price of 'cumin'. | [Schema (values) (types)]: | products_gen_characteristics | Ref_Characteristic_Types : characteristic_type_code (text) , characteristic_type_description (text) | Ref_Colors : color_code (text) , color_description (text) | Ref_Product_Categories : product_category_code (text) , product_category_description (text) , unit_of_measure (text) | Characteristics : characteristic_id (text) , characteristic_type_code (text) , characteristic_data_type (text) , characteristic_name (text) , other_characteristic_details (text) | Products : product_id (text) , color_code (text) , product_category_code (text) , product_name (text) , typical_buying_price (text) , typical_selling_price (text) , product_description (text) , other_product_details (text) | Product_Characteristics : product_id (text) , characteristic_id (text) , product_characteristic_value (text); | [Primary Keys]: ref_characteristic_types : characteristic_type_code, ref_colors : color_code, ref_product_categories : product_category_code, characteristics : characteristic_id, products : product_id | [Foreign Keys]: characteristics : characteristic_type_code = ref_characteristic_types : characteristic_type_code | products : color_code = ref_colors : color_code | products : product_category_code = ref_product_categories : product_category_code | product_characteristics : product_id = products : product_id | product_characteristics : characteristic_id = characteristics : characteristic_id |
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | products_gen_characteristics | Ref_Characteristic_Types : characteristic_type_code (text) , characteristic_type_description (text) | Ref_Colors : color_code (text) , color_description (text) | Ref_Product_Categories : product_category_code (text) , product_category_description (text) , unit_of_measure (text) | Characteristics : characteristic_id (text) , characteristic_type_code (text) , characteristic_data_type (text) , characteristic_name (text) , other_characteristic_details (text) | Products : product_id (text) , color_code (text) , product_category_code (text) , product_name (text) , typical_buying_price (text) , typical_selling_price (text) , product_description (text) , other_product_details (text) | Product_Characteristics : product_id (text) , characteristic_id (text) , product_characteristic_value (text);</schema>"
<primary_keys>[Primary Keys]: ref_characteristic_types : characteristic_type_code, ref_colors : color_code, ref_product_categories : product_category_code, characteristics : characteristic_id, products : product_id</primary_keys>"
<foreign_keys>[Foreign Keys]: characteristics : characteristic_type_code = ref_characteristic_types : characteristic_type_code | products : color_code = ref_colors : color_code | products : product_category_code = ref_product_categories : product_category_code | product_characteristics : product_id = products : product_id | product_characteristics : characteristic_id = characteristics : characteristic_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>Which category does the product named "flax" belong to?</question>
[SQL]:
| <SQL_QUERY>SELECT product_category_code FROM products WHERE product_name = "flax"</SQL_QUERY> | products_gen_characteristics | SELECT product_category_code FROM products WHERE product_name = "flax" | Which category does the product named "flax" belong to? | [Schema (values) (types)]: | products_gen_characteristics | Ref_Characteristic_Types : characteristic_type_code (text) , characteristic_type_description (text) | Ref_Colors : color_code (text) , color_description (text) | Ref_Product_Categories : product_category_code (text) , product_category_description (text) , unit_of_measure (text) | Characteristics : characteristic_id (text) , characteristic_type_code (text) , characteristic_data_type (text) , characteristic_name (text) , other_characteristic_details (text) | Products : product_id (text) , color_code (text) , product_category_code (text) , product_name (text) , typical_buying_price (text) , typical_selling_price (text) , product_description (text) , other_product_details (text) | Product_Characteristics : product_id (text) , characteristic_id (text) , product_characteristic_value (text); | [Primary Keys]: ref_characteristic_types : characteristic_type_code, ref_colors : color_code, ref_product_categories : product_category_code, characteristics : characteristic_id, products : product_id | [Foreign Keys]: characteristics : characteristic_type_code = ref_characteristic_types : characteristic_type_code | products : color_code = ref_colors : color_code | products : product_category_code = ref_product_categories : product_category_code | product_characteristics : product_id = products : product_id | product_characteristics : characteristic_id = characteristics : characteristic_id |
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | products_gen_characteristics | Ref_Characteristic_Types : characteristic_type_code (text) , characteristic_type_description (text) | Ref_Colors : color_code (text) , color_description (text) | Ref_Product_Categories : product_category_code (text) , product_category_description (text) , unit_of_measure (text) | Characteristics : characteristic_id (text) , characteristic_type_code (text) , characteristic_data_type (text) , characteristic_name (text) , other_characteristic_details (text) | Products : product_id (text) , color_code (text) , product_category_code (text) , product_name (text) , typical_buying_price (text) , typical_selling_price (text) , product_description (text) , other_product_details (text) | Product_Characteristics : product_id (text) , characteristic_id (text) , product_characteristic_value (text);</schema>"
<primary_keys>[Primary Keys]: ref_characteristic_types : characteristic_type_code, ref_colors : color_code, ref_product_categories : product_category_code, characteristics : characteristic_id, products : product_id</primary_keys>"
<foreign_keys>[Foreign Keys]: characteristics : characteristic_type_code = ref_characteristic_types : characteristic_type_code | products : color_code = ref_colors : color_code | products : product_category_code = ref_product_categories : product_category_code | product_characteristics : product_id = products : product_id | product_characteristics : characteristic_id = characteristics : characteristic_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>What is the code of the category that the product with the name 'flax' belongs to?</question>
[SQL]:
| <SQL_QUERY>SELECT product_category_code FROM products WHERE product_name = "flax"</SQL_QUERY> | products_gen_characteristics | SELECT product_category_code FROM products WHERE product_name = "flax" | What is the code of the category that the product with the name 'flax' belongs to? | [Schema (values) (types)]: | products_gen_characteristics | Ref_Characteristic_Types : characteristic_type_code (text) , characteristic_type_description (text) | Ref_Colors : color_code (text) , color_description (text) | Ref_Product_Categories : product_category_code (text) , product_category_description (text) , unit_of_measure (text) | Characteristics : characteristic_id (text) , characteristic_type_code (text) , characteristic_data_type (text) , characteristic_name (text) , other_characteristic_details (text) | Products : product_id (text) , color_code (text) , product_category_code (text) , product_name (text) , typical_buying_price (text) , typical_selling_price (text) , product_description (text) , other_product_details (text) | Product_Characteristics : product_id (text) , characteristic_id (text) , product_characteristic_value (text); | [Primary Keys]: ref_characteristic_types : characteristic_type_code, ref_colors : color_code, ref_product_categories : product_category_code, characteristics : characteristic_id, products : product_id | [Foreign Keys]: characteristics : characteristic_type_code = ref_characteristic_types : characteristic_type_code | products : color_code = ref_colors : color_code | products : product_category_code = ref_product_categories : product_category_code | product_characteristics : product_id = products : product_id | product_characteristics : characteristic_id = characteristics : characteristic_id |
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | products_gen_characteristics | Ref_Characteristic_Types : characteristic_type_code (text) , characteristic_type_description (text) | Ref_Colors : color_code (text) , color_description (text) | Ref_Product_Categories : product_category_code (text) , product_category_description (text) , unit_of_measure (text) | Characteristics : characteristic_id (text) , characteristic_type_code (text) , characteristic_data_type (text) , characteristic_name (text) , other_characteristic_details (text) | Products : product_id (text) , color_code (text) , product_category_code (text) , product_name (text) , typical_buying_price (text) , typical_selling_price (text) , product_description (text) , other_product_details (text) | Product_Characteristics : product_id (text) , characteristic_id (text) , product_characteristic_value (text);</schema>"
<primary_keys>[Primary Keys]: ref_characteristic_types : characteristic_type_code, ref_colors : color_code, ref_product_categories : product_category_code, characteristics : characteristic_id, products : product_id</primary_keys>"
<foreign_keys>[Foreign Keys]: characteristics : characteristic_type_code = ref_characteristic_types : characteristic_type_code | products : color_code = ref_colors : color_code | products : product_category_code = ref_product_categories : product_category_code | product_characteristics : product_id = products : product_id | product_characteristics : characteristic_id = characteristics : characteristic_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>What is the name of the product with the color description 'yellow'?</question>
[SQL]:
| <SQL_QUERY>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'</SQL_QUERY> | 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' | What is the name of the product with the color description 'yellow'? | [Schema (values) (types)]: | products_gen_characteristics | Ref_Characteristic_Types : characteristic_type_code (text) , characteristic_type_description (text) | Ref_Colors : color_code (text) , color_description (text) | Ref_Product_Categories : product_category_code (text) , product_category_description (text) , unit_of_measure (text) | Characteristics : characteristic_id (text) , characteristic_type_code (text) , characteristic_data_type (text) , characteristic_name (text) , other_characteristic_details (text) | Products : product_id (text) , color_code (text) , product_category_code (text) , product_name (text) , typical_buying_price (text) , typical_selling_price (text) , product_description (text) , other_product_details (text) | Product_Characteristics : product_id (text) , characteristic_id (text) , product_characteristic_value (text); | [Primary Keys]: ref_characteristic_types : characteristic_type_code, ref_colors : color_code, ref_product_categories : product_category_code, characteristics : characteristic_id, products : product_id | [Foreign Keys]: characteristics : characteristic_type_code = ref_characteristic_types : characteristic_type_code | products : color_code = ref_colors : color_code | products : product_category_code = ref_product_categories : product_category_code | product_characteristics : product_id = products : product_id | product_characteristics : characteristic_id = characteristics : characteristic_id |
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | products_gen_characteristics | Ref_Characteristic_Types : characteristic_type_code (text) , characteristic_type_description (text) | Ref_Colors : color_code (text) , color_description (text) | Ref_Product_Categories : product_category_code (text) , product_category_description (text) , unit_of_measure (text) | Characteristics : characteristic_id (text) , characteristic_type_code (text) , characteristic_data_type (text) , characteristic_name (text) , other_characteristic_details (text) | Products : product_id (text) , color_code (text) , product_category_code (text) , product_name (text) , typical_buying_price (text) , typical_selling_price (text) , product_description (text) , other_product_details (text) | Product_Characteristics : product_id (text) , characteristic_id (text) , product_characteristic_value (text);</schema>"
<primary_keys>[Primary Keys]: ref_characteristic_types : characteristic_type_code, ref_colors : color_code, ref_product_categories : product_category_code, characteristics : characteristic_id, products : product_id</primary_keys>"
<foreign_keys>[Foreign Keys]: characteristics : characteristic_type_code = ref_characteristic_types : characteristic_type_code | products : color_code = ref_colors : color_code | products : product_category_code = ref_product_categories : product_category_code | product_characteristics : product_id = products : product_id | product_characteristics : characteristic_id = characteristics : characteristic_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>Give the name of the products that have a color description 'yellow'.</question>
[SQL]:
| <SQL_QUERY>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'</SQL_QUERY> | 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' | Give the name of the products that have a color description 'yellow'. | [Schema (values) (types)]: | products_gen_characteristics | Ref_Characteristic_Types : characteristic_type_code (text) , characteristic_type_description (text) | Ref_Colors : color_code (text) , color_description (text) | Ref_Product_Categories : product_category_code (text) , product_category_description (text) , unit_of_measure (text) | Characteristics : characteristic_id (text) , characteristic_type_code (text) , characteristic_data_type (text) , characteristic_name (text) , other_characteristic_details (text) | Products : product_id (text) , color_code (text) , product_category_code (text) , product_name (text) , typical_buying_price (text) , typical_selling_price (text) , product_description (text) , other_product_details (text) | Product_Characteristics : product_id (text) , characteristic_id (text) , product_characteristic_value (text); | [Primary Keys]: ref_characteristic_types : characteristic_type_code, ref_colors : color_code, ref_product_categories : product_category_code, characteristics : characteristic_id, products : product_id | [Foreign Keys]: characteristics : characteristic_type_code = ref_characteristic_types : characteristic_type_code | products : color_code = ref_colors : color_code | products : product_category_code = ref_product_categories : product_category_code | product_characteristics : product_id = products : product_id | product_characteristics : characteristic_id = characteristics : characteristic_id |
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | products_gen_characteristics | Ref_Characteristic_Types : characteristic_type_code (text) , characteristic_type_description (text) | Ref_Colors : color_code (text) , color_description (text) | Ref_Product_Categories : product_category_code (text) , product_category_description (text) , unit_of_measure (text) | Characteristics : characteristic_id (text) , characteristic_type_code (text) , characteristic_data_type (text) , characteristic_name (text) , other_characteristic_details (text) | Products : product_id (text) , color_code (text) , product_category_code (text) , product_name (text) , typical_buying_price (text) , typical_selling_price (text) , product_description (text) , other_product_details (text) | Product_Characteristics : product_id (text) , characteristic_id (text) , product_characteristic_value (text);</schema>"
<primary_keys>[Primary Keys]: ref_characteristic_types : characteristic_type_code, ref_colors : color_code, ref_product_categories : product_category_code, characteristics : characteristic_id, products : product_id</primary_keys>"
<foreign_keys>[Foreign Keys]: characteristics : characteristic_type_code = ref_characteristic_types : characteristic_type_code | products : color_code = ref_colors : color_code | products : product_category_code = ref_product_categories : product_category_code | product_characteristics : product_id = products : product_id | product_characteristics : characteristic_id = characteristics : characteristic_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>Find the category descriptions of the products whose descriptions include letter 't'.</question>
[SQL]:
| <SQL_QUERY>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%'</SQL_QUERY> | 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%' | Find the category descriptions of the products whose descriptions include letter 't'. | [Schema (values) (types)]: | products_gen_characteristics | Ref_Characteristic_Types : characteristic_type_code (text) , characteristic_type_description (text) | Ref_Colors : color_code (text) , color_description (text) | Ref_Product_Categories : product_category_code (text) , product_category_description (text) , unit_of_measure (text) | Characteristics : characteristic_id (text) , characteristic_type_code (text) , characteristic_data_type (text) , characteristic_name (text) , other_characteristic_details (text) | Products : product_id (text) , color_code (text) , product_category_code (text) , product_name (text) , typical_buying_price (text) , typical_selling_price (text) , product_description (text) , other_product_details (text) | Product_Characteristics : product_id (text) , characteristic_id (text) , product_characteristic_value (text); | [Primary Keys]: ref_characteristic_types : characteristic_type_code, ref_colors : color_code, ref_product_categories : product_category_code, characteristics : characteristic_id, products : product_id | [Foreign Keys]: characteristics : characteristic_type_code = ref_characteristic_types : characteristic_type_code | products : color_code = ref_colors : color_code | products : product_category_code = ref_product_categories : product_category_code | product_characteristics : product_id = products : product_id | product_characteristics : characteristic_id = characteristics : characteristic_id |
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | products_gen_characteristics | Ref_Characteristic_Types : characteristic_type_code (text) , characteristic_type_description (text) | Ref_Colors : color_code (text) , color_description (text) | Ref_Product_Categories : product_category_code (text) , product_category_description (text) , unit_of_measure (text) | Characteristics : characteristic_id (text) , characteristic_type_code (text) , characteristic_data_type (text) , characteristic_name (text) , other_characteristic_details (text) | Products : product_id (text) , color_code (text) , product_category_code (text) , product_name (text) , typical_buying_price (text) , typical_selling_price (text) , product_description (text) , other_product_details (text) | Product_Characteristics : product_id (text) , characteristic_id (text) , product_characteristic_value (text);</schema>"
<primary_keys>[Primary Keys]: ref_characteristic_types : characteristic_type_code, ref_colors : color_code, ref_product_categories : product_category_code, characteristics : characteristic_id, products : product_id</primary_keys>"
<foreign_keys>[Foreign Keys]: characteristics : characteristic_type_code = ref_characteristic_types : characteristic_type_code | products : color_code = ref_colors : color_code | products : product_category_code = ref_product_categories : product_category_code | product_characteristics : product_id = products : product_id | product_characteristics : characteristic_id = characteristics : characteristic_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>What are the descriptions of the categories that products with product descriptions that contain the letter t are in?</question>
[SQL]:
| <SQL_QUERY>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%'</SQL_QUERY> | 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%' | What are the descriptions of the categories that products with product descriptions that contain the letter t are in? | [Schema (values) (types)]: | products_gen_characteristics | Ref_Characteristic_Types : characteristic_type_code (text) , characteristic_type_description (text) | Ref_Colors : color_code (text) , color_description (text) | Ref_Product_Categories : product_category_code (text) , product_category_description (text) , unit_of_measure (text) | Characteristics : characteristic_id (text) , characteristic_type_code (text) , characteristic_data_type (text) , characteristic_name (text) , other_characteristic_details (text) | Products : product_id (text) , color_code (text) , product_category_code (text) , product_name (text) , typical_buying_price (text) , typical_selling_price (text) , product_description (text) , other_product_details (text) | Product_Characteristics : product_id (text) , characteristic_id (text) , product_characteristic_value (text); | [Primary Keys]: ref_characteristic_types : characteristic_type_code, ref_colors : color_code, ref_product_categories : product_category_code, characteristics : characteristic_id, products : product_id | [Foreign Keys]: characteristics : characteristic_type_code = ref_characteristic_types : characteristic_type_code | products : color_code = ref_colors : color_code | products : product_category_code = ref_product_categories : product_category_code | product_characteristics : product_id = products : product_id | product_characteristics : characteristic_id = characteristics : characteristic_id |
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | products_gen_characteristics | Ref_Characteristic_Types : characteristic_type_code (text) , characteristic_type_description (text) | Ref_Colors : color_code (text) , color_description (text) | Ref_Product_Categories : product_category_code (text) , product_category_description (text) , unit_of_measure (text) | Characteristics : characteristic_id (text) , characteristic_type_code (text) , characteristic_data_type (text) , characteristic_name (text) , other_characteristic_details (text) | Products : product_id (text) , color_code (text) , product_category_code (text) , product_name (text) , typical_buying_price (text) , typical_selling_price (text) , product_description (text) , other_product_details (text) | Product_Characteristics : product_id (text) , characteristic_id (text) , product_characteristic_value (text);</schema>"
<primary_keys>[Primary Keys]: ref_characteristic_types : characteristic_type_code, ref_colors : color_code, ref_product_categories : product_category_code, characteristics : characteristic_id, products : product_id</primary_keys>"
<foreign_keys>[Foreign Keys]: characteristics : characteristic_type_code = ref_characteristic_types : characteristic_type_code | products : color_code = ref_colors : color_code | products : product_category_code = ref_product_categories : product_category_code | product_characteristics : product_id = products : product_id | product_characteristics : characteristic_id = characteristics : characteristic_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>What is the color description of the product with name "catnip"?</question>
[SQL]:
| <SQL_QUERY>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"</SQL_QUERY> | 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" | What is the color description of the product with name "catnip"? | [Schema (values) (types)]: | products_gen_characteristics | Ref_Characteristic_Types : characteristic_type_code (text) , characteristic_type_description (text) | Ref_Colors : color_code (text) , color_description (text) | Ref_Product_Categories : product_category_code (text) , product_category_description (text) , unit_of_measure (text) | Characteristics : characteristic_id (text) , characteristic_type_code (text) , characteristic_data_type (text) , characteristic_name (text) , other_characteristic_details (text) | Products : product_id (text) , color_code (text) , product_category_code (text) , product_name (text) , typical_buying_price (text) , typical_selling_price (text) , product_description (text) , other_product_details (text) | Product_Characteristics : product_id (text) , characteristic_id (text) , product_characteristic_value (text); | [Primary Keys]: ref_characteristic_types : characteristic_type_code, ref_colors : color_code, ref_product_categories : product_category_code, characteristics : characteristic_id, products : product_id | [Foreign Keys]: characteristics : characteristic_type_code = ref_characteristic_types : characteristic_type_code | products : color_code = ref_colors : color_code | products : product_category_code = ref_product_categories : product_category_code | product_characteristics : product_id = products : product_id | product_characteristics : characteristic_id = characteristics : characteristic_id |
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | products_gen_characteristics | Ref_Characteristic_Types : characteristic_type_code (text) , characteristic_type_description (text) | Ref_Colors : color_code (text) , color_description (text) | Ref_Product_Categories : product_category_code (text) , product_category_description (text) , unit_of_measure (text) | Characteristics : characteristic_id (text) , characteristic_type_code (text) , characteristic_data_type (text) , characteristic_name (text) , other_characteristic_details (text) | Products : product_id (text) , color_code (text) , product_category_code (text) , product_name (text) , typical_buying_price (text) , typical_selling_price (text) , product_description (text) , other_product_details (text) | Product_Characteristics : product_id (text) , characteristic_id (text) , product_characteristic_value (text);</schema>"
<primary_keys>[Primary Keys]: ref_characteristic_types : characteristic_type_code, ref_colors : color_code, ref_product_categories : product_category_code, characteristics : characteristic_id, products : product_id</primary_keys>"
<foreign_keys>[Foreign Keys]: characteristics : characteristic_type_code = ref_characteristic_types : characteristic_type_code | products : color_code = ref_colors : color_code | products : product_category_code = ref_product_categories : product_category_code | product_characteristics : product_id = products : product_id | product_characteristics : characteristic_id = characteristics : characteristic_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>Give the color description for the product 'catnip'.</question>
[SQL]:
| <SQL_QUERY>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"</SQL_QUERY> | 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" | Give the color description for the product 'catnip'. | [Schema (values) (types)]: | products_gen_characteristics | Ref_Characteristic_Types : characteristic_type_code (text) , characteristic_type_description (text) | Ref_Colors : color_code (text) , color_description (text) | Ref_Product_Categories : product_category_code (text) , product_category_description (text) , unit_of_measure (text) | Characteristics : characteristic_id (text) , characteristic_type_code (text) , characteristic_data_type (text) , characteristic_name (text) , other_characteristic_details (text) | Products : product_id (text) , color_code (text) , product_category_code (text) , product_name (text) , typical_buying_price (text) , typical_selling_price (text) , product_description (text) , other_product_details (text) | Product_Characteristics : product_id (text) , characteristic_id (text) , product_characteristic_value (text); | [Primary Keys]: ref_characteristic_types : characteristic_type_code, ref_colors : color_code, ref_product_categories : product_category_code, characteristics : characteristic_id, products : product_id | [Foreign Keys]: characteristics : characteristic_type_code = ref_characteristic_types : characteristic_type_code | products : color_code = ref_colors : color_code | products : product_category_code = ref_product_categories : product_category_code | product_characteristics : product_id = products : product_id | product_characteristics : characteristic_id = characteristics : characteristic_id |
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | products_gen_characteristics | Ref_Characteristic_Types : characteristic_type_code (text) , characteristic_type_description (text) | Ref_Colors : color_code (text) , color_description (text) | Ref_Product_Categories : product_category_code (text) , product_category_description (text) , unit_of_measure (text) | Characteristics : characteristic_id (text) , characteristic_type_code (text) , characteristic_data_type (text) , characteristic_name (text) , other_characteristic_details (text) | Products : product_id (text) , color_code (text) , product_category_code (text) , product_name (text) , typical_buying_price (text) , typical_selling_price (text) , product_description (text) , other_product_details (text) | Product_Characteristics : product_id (text) , characteristic_id (text) , product_characteristic_value (text);</schema>"
<primary_keys>[Primary Keys]: ref_characteristic_types : characteristic_type_code, ref_colors : color_code, ref_product_categories : product_category_code, characteristics : characteristic_id, products : product_id</primary_keys>"
<foreign_keys>[Foreign Keys]: characteristics : characteristic_type_code = ref_characteristic_types : characteristic_type_code | products : color_code = ref_colors : color_code | products : product_category_code = ref_product_categories : product_category_code | product_characteristics : product_id = products : product_id | product_characteristics : characteristic_id = characteristics : characteristic_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>What is the color code and description of the product named "chervil"?</question>
[SQL]:
| <SQL_QUERY>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"</SQL_QUERY> | 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" | What is the color code and description of the product named "chervil"? | [Schema (values) (types)]: | products_gen_characteristics | Ref_Characteristic_Types : characteristic_type_code (text) , characteristic_type_description (text) | Ref_Colors : color_code (text) , color_description (text) | Ref_Product_Categories : product_category_code (text) , product_category_description (text) , unit_of_measure (text) | Characteristics : characteristic_id (text) , characteristic_type_code (text) , characteristic_data_type (text) , characteristic_name (text) , other_characteristic_details (text) | Products : product_id (text) , color_code (text) , product_category_code (text) , product_name (text) , typical_buying_price (text) , typical_selling_price (text) , product_description (text) , other_product_details (text) | Product_Characteristics : product_id (text) , characteristic_id (text) , product_characteristic_value (text); | [Primary Keys]: ref_characteristic_types : characteristic_type_code, ref_colors : color_code, ref_product_categories : product_category_code, characteristics : characteristic_id, products : product_id | [Foreign Keys]: characteristics : characteristic_type_code = ref_characteristic_types : characteristic_type_code | products : color_code = ref_colors : color_code | products : product_category_code = ref_product_categories : product_category_code | product_characteristics : product_id = products : product_id | product_characteristics : characteristic_id = characteristics : characteristic_id |
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | products_gen_characteristics | Ref_Characteristic_Types : characteristic_type_code (text) , characteristic_type_description (text) | Ref_Colors : color_code (text) , color_description (text) | Ref_Product_Categories : product_category_code (text) , product_category_description (text) , unit_of_measure (text) | Characteristics : characteristic_id (text) , characteristic_type_code (text) , characteristic_data_type (text) , characteristic_name (text) , other_characteristic_details (text) | Products : product_id (text) , color_code (text) , product_category_code (text) , product_name (text) , typical_buying_price (text) , typical_selling_price (text) , product_description (text) , other_product_details (text) | Product_Characteristics : product_id (text) , characteristic_id (text) , product_characteristic_value (text);</schema>"
<primary_keys>[Primary Keys]: ref_characteristic_types : characteristic_type_code, ref_colors : color_code, ref_product_categories : product_category_code, characteristics : characteristic_id, products : product_id</primary_keys>"
<foreign_keys>[Foreign Keys]: characteristics : characteristic_type_code = ref_characteristic_types : characteristic_type_code | products : color_code = ref_colors : color_code | products : product_category_code = ref_product_categories : product_category_code | product_characteristics : product_id = products : product_id | product_characteristics : characteristic_id = characteristics : characteristic_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>Return the color code and description for the product with the name 'chervil'.</question>
[SQL]:
| <SQL_QUERY>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"</SQL_QUERY> | 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" | Return the color code and description for the product with the name 'chervil'. | [Schema (values) (types)]: | products_gen_characteristics | Ref_Characteristic_Types : characteristic_type_code (text) , characteristic_type_description (text) | Ref_Colors : color_code (text) , color_description (text) | Ref_Product_Categories : product_category_code (text) , product_category_description (text) , unit_of_measure (text) | Characteristics : characteristic_id (text) , characteristic_type_code (text) , characteristic_data_type (text) , characteristic_name (text) , other_characteristic_details (text) | Products : product_id (text) , color_code (text) , product_category_code (text) , product_name (text) , typical_buying_price (text) , typical_selling_price (text) , product_description (text) , other_product_details (text) | Product_Characteristics : product_id (text) , characteristic_id (text) , product_characteristic_value (text); | [Primary Keys]: ref_characteristic_types : characteristic_type_code, ref_colors : color_code, ref_product_categories : product_category_code, characteristics : characteristic_id, products : product_id | [Foreign Keys]: characteristics : characteristic_type_code = ref_characteristic_types : characteristic_type_code | products : color_code = ref_colors : color_code | products : product_category_code = ref_product_categories : product_category_code | product_characteristics : product_id = products : product_id | product_characteristics : characteristic_id = characteristics : characteristic_id |
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | products_gen_characteristics | Ref_Characteristic_Types : characteristic_type_code (text) , characteristic_type_description (text) | Ref_Colors : color_code (text) , color_description (text) | Ref_Product_Categories : product_category_code (text) , product_category_description (text) , unit_of_measure (text) | Characteristics : characteristic_id (text) , characteristic_type_code (text) , characteristic_data_type (text) , characteristic_name (text) , other_characteristic_details (text) | Products : product_id (text) , color_code (text) , product_category_code (text) , product_name (text) , typical_buying_price (text) , typical_selling_price (text) , product_description (text) , other_product_details (text) | Product_Characteristics : product_id (text) , characteristic_id (text) , product_characteristic_value (text);</schema>"
<primary_keys>[Primary Keys]: ref_characteristic_types : characteristic_type_code, ref_colors : color_code, ref_product_categories : product_category_code, characteristics : characteristic_id, products : product_id</primary_keys>"
<foreign_keys>[Foreign Keys]: characteristics : characteristic_type_code = ref_characteristic_types : characteristic_type_code | products : color_code = ref_colors : color_code | products : product_category_code = ref_product_categories : product_category_code | product_characteristics : product_id = products : product_id | product_characteristics : characteristic_id = characteristics : characteristic_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>Find the id and color description of the products with at least 2 characteristics.</question>
[SQL]:
| <SQL_QUERY>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</SQL_QUERY> | 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 | Find the id and color description of the products with at least 2 characteristics. | [Schema (values) (types)]: | products_gen_characteristics | Ref_Characteristic_Types : characteristic_type_code (text) , characteristic_type_description (text) | Ref_Colors : color_code (text) , color_description (text) | Ref_Product_Categories : product_category_code (text) , product_category_description (text) , unit_of_measure (text) | Characteristics : characteristic_id (text) , characteristic_type_code (text) , characteristic_data_type (text) , characteristic_name (text) , other_characteristic_details (text) | Products : product_id (text) , color_code (text) , product_category_code (text) , product_name (text) , typical_buying_price (text) , typical_selling_price (text) , product_description (text) , other_product_details (text) | Product_Characteristics : product_id (text) , characteristic_id (text) , product_characteristic_value (text); | [Primary Keys]: ref_characteristic_types : characteristic_type_code, ref_colors : color_code, ref_product_categories : product_category_code, characteristics : characteristic_id, products : product_id | [Foreign Keys]: characteristics : characteristic_type_code = ref_characteristic_types : characteristic_type_code | products : color_code = ref_colors : color_code | products : product_category_code = ref_product_categories : product_category_code | product_characteristics : product_id = products : product_id | product_characteristics : characteristic_id = characteristics : characteristic_id |
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | products_gen_characteristics | Ref_Characteristic_Types : characteristic_type_code (text) , characteristic_type_description (text) | Ref_Colors : color_code (text) , color_description (text) | Ref_Product_Categories : product_category_code (text) , product_category_description (text) , unit_of_measure (text) | Characteristics : characteristic_id (text) , characteristic_type_code (text) , characteristic_data_type (text) , characteristic_name (text) , other_characteristic_details (text) | Products : product_id (text) , color_code (text) , product_category_code (text) , product_name (text) , typical_buying_price (text) , typical_selling_price (text) , product_description (text) , other_product_details (text) | Product_Characteristics : product_id (text) , characteristic_id (text) , product_characteristic_value (text);</schema>"
<primary_keys>[Primary Keys]: ref_characteristic_types : characteristic_type_code, ref_colors : color_code, ref_product_categories : product_category_code, characteristics : characteristic_id, products : product_id</primary_keys>"
<foreign_keys>[Foreign Keys]: characteristics : characteristic_type_code = ref_characteristic_types : characteristic_type_code | products : color_code = ref_colors : color_code | products : product_category_code = ref_product_categories : product_category_code | product_characteristics : product_id = products : product_id | product_characteristics : characteristic_id = characteristics : characteristic_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>What are the product ids and color descriptions for products with two or more characteristics?</question>
[SQL]:
| <SQL_QUERY>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</SQL_QUERY> | 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 | What are the product ids and color descriptions for products with two or more characteristics? | [Schema (values) (types)]: | products_gen_characteristics | Ref_Characteristic_Types : characteristic_type_code (text) , characteristic_type_description (text) | Ref_Colors : color_code (text) , color_description (text) | Ref_Product_Categories : product_category_code (text) , product_category_description (text) , unit_of_measure (text) | Characteristics : characteristic_id (text) , characteristic_type_code (text) , characteristic_data_type (text) , characteristic_name (text) , other_characteristic_details (text) | Products : product_id (text) , color_code (text) , product_category_code (text) , product_name (text) , typical_buying_price (text) , typical_selling_price (text) , product_description (text) , other_product_details (text) | Product_Characteristics : product_id (text) , characteristic_id (text) , product_characteristic_value (text); | [Primary Keys]: ref_characteristic_types : characteristic_type_code, ref_colors : color_code, ref_product_categories : product_category_code, characteristics : characteristic_id, products : product_id | [Foreign Keys]: characteristics : characteristic_type_code = ref_characteristic_types : characteristic_type_code | products : color_code = ref_colors : color_code | products : product_category_code = ref_product_categories : product_category_code | product_characteristics : product_id = products : product_id | product_characteristics : characteristic_id = characteristics : characteristic_id |
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | products_gen_characteristics | Ref_Characteristic_Types : characteristic_type_code (text) , characteristic_type_description (text) | Ref_Colors : color_code (text) , color_description (text) | Ref_Product_Categories : product_category_code (text) , product_category_description (text) , unit_of_measure (text) | Characteristics : characteristic_id (text) , characteristic_type_code (text) , characteristic_data_type (text) , characteristic_name (text) , other_characteristic_details (text) | Products : product_id (text) , color_code (text) , product_category_code (text) , product_name (text) , typical_buying_price (text) , typical_selling_price (text) , product_description (text) , other_product_details (text) | Product_Characteristics : product_id (text) , characteristic_id (text) , product_characteristic_value (text);</schema>"
<primary_keys>[Primary Keys]: ref_characteristic_types : characteristic_type_code, ref_colors : color_code, ref_product_categories : product_category_code, characteristics : characteristic_id, products : product_id</primary_keys>"
<foreign_keys>[Foreign Keys]: characteristics : characteristic_type_code = ref_characteristic_types : characteristic_type_code | products : color_code = ref_colors : color_code | products : product_category_code = ref_product_categories : product_category_code | product_characteristics : product_id = products : product_id | product_characteristics : characteristic_id = characteristics : characteristic_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>List all the product names with the color description "white".</question>
[SQL]:
| <SQL_QUERY>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"</SQL_QUERY> | 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" | List all the product names with the color description "white". | [Schema (values) (types)]: | products_gen_characteristics | Ref_Characteristic_Types : characteristic_type_code (text) , characteristic_type_description (text) | Ref_Colors : color_code (text) , color_description (text) | Ref_Product_Categories : product_category_code (text) , product_category_description (text) , unit_of_measure (text) | Characteristics : characteristic_id (text) , characteristic_type_code (text) , characteristic_data_type (text) , characteristic_name (text) , other_characteristic_details (text) | Products : product_id (text) , color_code (text) , product_category_code (text) , product_name (text) , typical_buying_price (text) , typical_selling_price (text) , product_description (text) , other_product_details (text) | Product_Characteristics : product_id (text) , characteristic_id (text) , product_characteristic_value (text); | [Primary Keys]: ref_characteristic_types : characteristic_type_code, ref_colors : color_code, ref_product_categories : product_category_code, characteristics : characteristic_id, products : product_id | [Foreign Keys]: characteristics : characteristic_type_code = ref_characteristic_types : characteristic_type_code | products : color_code = ref_colors : color_code | products : product_category_code = ref_product_categories : product_category_code | product_characteristics : product_id = products : product_id | product_characteristics : characteristic_id = characteristics : characteristic_id |
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | products_gen_characteristics | Ref_Characteristic_Types : characteristic_type_code (text) , characteristic_type_description (text) | Ref_Colors : color_code (text) , color_description (text) | Ref_Product_Categories : product_category_code (text) , product_category_description (text) , unit_of_measure (text) | Characteristics : characteristic_id (text) , characteristic_type_code (text) , characteristic_data_type (text) , characteristic_name (text) , other_characteristic_details (text) | Products : product_id (text) , color_code (text) , product_category_code (text) , product_name (text) , typical_buying_price (text) , typical_selling_price (text) , product_description (text) , other_product_details (text) | Product_Characteristics : product_id (text) , characteristic_id (text) , product_characteristic_value (text);</schema>"
<primary_keys>[Primary Keys]: ref_characteristic_types : characteristic_type_code, ref_colors : color_code, ref_product_categories : product_category_code, characteristics : characteristic_id, products : product_id</primary_keys>"
<foreign_keys>[Foreign Keys]: characteristics : characteristic_type_code = ref_characteristic_types : characteristic_type_code | products : color_code = ref_colors : color_code | products : product_category_code = ref_product_categories : product_category_code | product_characteristics : product_id = products : product_id | product_characteristics : characteristic_id = characteristics : characteristic_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>What are the names of products with 'white' as their color description?</question>
[SQL]:
| <SQL_QUERY>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"</SQL_QUERY> | 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" | What are the names of products with 'white' as their color description? | [Schema (values) (types)]: | products_gen_characteristics | Ref_Characteristic_Types : characteristic_type_code (text) , characteristic_type_description (text) | Ref_Colors : color_code (text) , color_description (text) | Ref_Product_Categories : product_category_code (text) , product_category_description (text) , unit_of_measure (text) | Characteristics : characteristic_id (text) , characteristic_type_code (text) , characteristic_data_type (text) , characteristic_name (text) , other_characteristic_details (text) | Products : product_id (text) , color_code (text) , product_category_code (text) , product_name (text) , typical_buying_price (text) , typical_selling_price (text) , product_description (text) , other_product_details (text) | Product_Characteristics : product_id (text) , characteristic_id (text) , product_characteristic_value (text); | [Primary Keys]: ref_characteristic_types : characteristic_type_code, ref_colors : color_code, ref_product_categories : product_category_code, characteristics : characteristic_id, products : product_id | [Foreign Keys]: characteristics : characteristic_type_code = ref_characteristic_types : characteristic_type_code | products : color_code = ref_colors : color_code | products : product_category_code = ref_product_categories : product_category_code | product_characteristics : product_id = products : product_id | product_characteristics : characteristic_id = characteristics : characteristic_id |
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | products_gen_characteristics | Ref_Characteristic_Types : characteristic_type_code (text) , characteristic_type_description (text) | Ref_Colors : color_code (text) , color_description (text) | Ref_Product_Categories : product_category_code (text) , product_category_description (text) , unit_of_measure (text) | Characteristics : characteristic_id (text) , characteristic_type_code (text) , characteristic_data_type (text) , characteristic_name (text) , other_characteristic_details (text) | Products : product_id (text) , color_code (text) , product_category_code (text) , product_name (text) , typical_buying_price (text) , typical_selling_price (text) , product_description (text) , other_product_details (text) | Product_Characteristics : product_id (text) , characteristic_id (text) , product_characteristic_value (text);</schema>"
<primary_keys>[Primary Keys]: ref_characteristic_types : characteristic_type_code, ref_colors : color_code, ref_product_categories : product_category_code, characteristics : characteristic_id, products : product_id</primary_keys>"
<foreign_keys>[Foreign Keys]: characteristics : characteristic_type_code = ref_characteristic_types : characteristic_type_code | products : color_code = ref_colors : color_code | products : product_category_code = ref_product_categories : product_category_code | product_characteristics : product_id = products : product_id | product_characteristics : characteristic_id = characteristics : characteristic_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>What are the name and typical buying and selling prices of the products that have color described as "yellow"?</question>
[SQL]:
| <SQL_QUERY>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"</SQL_QUERY> | 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" | What are the name and typical buying and selling prices of the products that have color described as "yellow"? | [Schema (values) (types)]: | products_gen_characteristics | Ref_Characteristic_Types : characteristic_type_code (text) , characteristic_type_description (text) | Ref_Colors : color_code (text) , color_description (text) | Ref_Product_Categories : product_category_code (text) , product_category_description (text) , unit_of_measure (text) | Characteristics : characteristic_id (text) , characteristic_type_code (text) , characteristic_data_type (text) , characteristic_name (text) , other_characteristic_details (text) | Products : product_id (text) , color_code (text) , product_category_code (text) , product_name (text) , typical_buying_price (text) , typical_selling_price (text) , product_description (text) , other_product_details (text) | Product_Characteristics : product_id (text) , characteristic_id (text) , product_characteristic_value (text); | [Primary Keys]: ref_characteristic_types : characteristic_type_code, ref_colors : color_code, ref_product_categories : product_category_code, characteristics : characteristic_id, products : product_id | [Foreign Keys]: characteristics : characteristic_type_code = ref_characteristic_types : characteristic_type_code | products : color_code = ref_colors : color_code | products : product_category_code = ref_product_categories : product_category_code | product_characteristics : product_id = products : product_id | product_characteristics : characteristic_id = characteristics : characteristic_id |
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | products_gen_characteristics | Ref_Characteristic_Types : characteristic_type_code (text) , characteristic_type_description (text) | Ref_Colors : color_code (text) , color_description (text) | Ref_Product_Categories : product_category_code (text) , product_category_description (text) , unit_of_measure (text) | Characteristics : characteristic_id (text) , characteristic_type_code (text) , characteristic_data_type (text) , characteristic_name (text) , other_characteristic_details (text) | Products : product_id (text) , color_code (text) , product_category_code (text) , product_name (text) , typical_buying_price (text) , typical_selling_price (text) , product_description (text) , other_product_details (text) | Product_Characteristics : product_id (text) , characteristic_id (text) , product_characteristic_value (text);</schema>"
<primary_keys>[Primary Keys]: ref_characteristic_types : characteristic_type_code, ref_colors : color_code, ref_product_categories : product_category_code, characteristics : characteristic_id, products : product_id</primary_keys>"
<foreign_keys>[Foreign Keys]: characteristics : characteristic_type_code = ref_characteristic_types : characteristic_type_code | products : color_code = ref_colors : color_code | products : product_category_code = ref_product_categories : product_category_code | product_characteristics : product_id = products : product_id | product_characteristics : characteristic_id = characteristics : characteristic_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>Return the names and typical buying and selling prices for products that have 'yellow' as their color description.</question>
[SQL]:
| <SQL_QUERY>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"</SQL_QUERY> | 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" | Return the names and typical buying and selling prices for products that have 'yellow' as their color description. | [Schema (values) (types)]: | products_gen_characteristics | Ref_Characteristic_Types : characteristic_type_code (text) , characteristic_type_description (text) | Ref_Colors : color_code (text) , color_description (text) | Ref_Product_Categories : product_category_code (text) , product_category_description (text) , unit_of_measure (text) | Characteristics : characteristic_id (text) , characteristic_type_code (text) , characteristic_data_type (text) , characteristic_name (text) , other_characteristic_details (text) | Products : product_id (text) , color_code (text) , product_category_code (text) , product_name (text) , typical_buying_price (text) , typical_selling_price (text) , product_description (text) , other_product_details (text) | Product_Characteristics : product_id (text) , characteristic_id (text) , product_characteristic_value (text); | [Primary Keys]: ref_characteristic_types : characteristic_type_code, ref_colors : color_code, ref_product_categories : product_category_code, characteristics : characteristic_id, products : product_id | [Foreign Keys]: characteristics : characteristic_type_code = ref_characteristic_types : characteristic_type_code | products : color_code = ref_colors : color_code | products : product_category_code = ref_product_categories : product_category_code | product_characteristics : product_id = products : product_id | product_characteristics : characteristic_id = characteristics : characteristic_id |
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | products_gen_characteristics | Ref_Characteristic_Types : characteristic_type_code (text) , characteristic_type_description (text) | Ref_Colors : color_code (text) , color_description (text) | Ref_Product_Categories : product_category_code (text) , product_category_description (text) , unit_of_measure (text) | Characteristics : characteristic_id (text) , characteristic_type_code (text) , characteristic_data_type (text) , characteristic_name (text) , other_characteristic_details (text) | Products : product_id (text) , color_code (text) , product_category_code (text) , product_name (text) , typical_buying_price (text) , typical_selling_price (text) , product_description (text) , other_product_details (text) | Product_Characteristics : product_id (text) , characteristic_id (text) , product_characteristic_value (text);</schema>"
<primary_keys>[Primary Keys]: ref_characteristic_types : characteristic_type_code, ref_colors : color_code, ref_product_categories : product_category_code, characteristics : characteristic_id, products : product_id</primary_keys>"
<foreign_keys>[Foreign Keys]: characteristics : characteristic_type_code = ref_characteristic_types : characteristic_type_code | products : color_code = ref_colors : color_code | products : product_category_code = ref_product_categories : product_category_code | product_characteristics : product_id = products : product_id | product_characteristics : characteristic_id = characteristics : characteristic_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>How many characteristics does the product named "sesame" have?</question>
[SQL]:
| <SQL_QUERY>SELECT count(*) FROM products AS t1 JOIN product_characteristics AS t2 ON t1.product_id = t2.product_id WHERE t1.product_name = "sesame"</SQL_QUERY> | 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" | How many characteristics does the product named "sesame" have? | [Schema (values) (types)]: | products_gen_characteristics | Ref_Characteristic_Types : characteristic_type_code (text) , characteristic_type_description (text) | Ref_Colors : color_code (text) , color_description (text) | Ref_Product_Categories : product_category_code (text) , product_category_description (text) , unit_of_measure (text) | Characteristics : characteristic_id (text) , characteristic_type_code (text) , characteristic_data_type (text) , characteristic_name (text) , other_characteristic_details (text) | Products : product_id (text) , color_code (text) , product_category_code (text) , product_name (text) , typical_buying_price (text) , typical_selling_price (text) , product_description (text) , other_product_details (text) | Product_Characteristics : product_id (text) , characteristic_id (text) , product_characteristic_value (text); | [Primary Keys]: ref_characteristic_types : characteristic_type_code, ref_colors : color_code, ref_product_categories : product_category_code, characteristics : characteristic_id, products : product_id | [Foreign Keys]: characteristics : characteristic_type_code = ref_characteristic_types : characteristic_type_code | products : color_code = ref_colors : color_code | products : product_category_code = ref_product_categories : product_category_code | product_characteristics : product_id = products : product_id | product_characteristics : characteristic_id = characteristics : characteristic_id |
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | products_gen_characteristics | Ref_Characteristic_Types : characteristic_type_code (text) , characteristic_type_description (text) | Ref_Colors : color_code (text) , color_description (text) | Ref_Product_Categories : product_category_code (text) , product_category_description (text) , unit_of_measure (text) | Characteristics : characteristic_id (text) , characteristic_type_code (text) , characteristic_data_type (text) , characteristic_name (text) , other_characteristic_details (text) | Products : product_id (text) , color_code (text) , product_category_code (text) , product_name (text) , typical_buying_price (text) , typical_selling_price (text) , product_description (text) , other_product_details (text) | Product_Characteristics : product_id (text) , characteristic_id (text) , product_characteristic_value (text);</schema>"
<primary_keys>[Primary Keys]: ref_characteristic_types : characteristic_type_code, ref_colors : color_code, ref_product_categories : product_category_code, characteristics : characteristic_id, products : product_id</primary_keys>"
<foreign_keys>[Foreign Keys]: characteristics : characteristic_type_code = ref_characteristic_types : characteristic_type_code | products : color_code = ref_colors : color_code | products : product_category_code = ref_product_categories : product_category_code | product_characteristics : product_id = products : product_id | product_characteristics : characteristic_id = characteristics : characteristic_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>Count the number of characteristics the product 'sesame' has.</question>
[SQL]:
| <SQL_QUERY>SELECT count(*) FROM products AS t1 JOIN product_characteristics AS t2 ON t1.product_id = t2.product_id WHERE t1.product_name = "sesame"</SQL_QUERY> | 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" | Count the number of characteristics the product 'sesame' has. | [Schema (values) (types)]: | products_gen_characteristics | Ref_Characteristic_Types : characteristic_type_code (text) , characteristic_type_description (text) | Ref_Colors : color_code (text) , color_description (text) | Ref_Product_Categories : product_category_code (text) , product_category_description (text) , unit_of_measure (text) | Characteristics : characteristic_id (text) , characteristic_type_code (text) , characteristic_data_type (text) , characteristic_name (text) , other_characteristic_details (text) | Products : product_id (text) , color_code (text) , product_category_code (text) , product_name (text) , typical_buying_price (text) , typical_selling_price (text) , product_description (text) , other_product_details (text) | Product_Characteristics : product_id (text) , characteristic_id (text) , product_characteristic_value (text); | [Primary Keys]: ref_characteristic_types : characteristic_type_code, ref_colors : color_code, ref_product_categories : product_category_code, characteristics : characteristic_id, products : product_id | [Foreign Keys]: characteristics : characteristic_type_code = ref_characteristic_types : characteristic_type_code | products : color_code = ref_colors : color_code | products : product_category_code = ref_product_categories : product_category_code | product_characteristics : product_id = products : product_id | product_characteristics : characteristic_id = characteristics : characteristic_id |
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | products_gen_characteristics | Ref_Characteristic_Types : characteristic_type_code (text) , characteristic_type_description (text) | Ref_Colors : color_code (text) , color_description (text) | Ref_Product_Categories : product_category_code (text) , product_category_description (text) , unit_of_measure (text) | Characteristics : characteristic_id (text) , characteristic_type_code (text) , characteristic_data_type (text) , characteristic_name (text) , other_characteristic_details (text) | Products : product_id (text) , color_code (text) , product_category_code (text) , product_name (text) , typical_buying_price (text) , typical_selling_price (text) , product_description (text) , other_product_details (text) | Product_Characteristics : product_id (text) , characteristic_id (text) , product_characteristic_value (text);</schema>"
<primary_keys>[Primary Keys]: ref_characteristic_types : characteristic_type_code, ref_colors : color_code, ref_product_categories : product_category_code, characteristics : characteristic_id, products : product_id</primary_keys>"
<foreign_keys>[Foreign Keys]: characteristics : characteristic_type_code = ref_characteristic_types : characteristic_type_code | products : color_code = ref_colors : color_code | products : product_category_code = ref_product_categories : product_category_code | product_characteristics : product_id = products : product_id | product_characteristics : characteristic_id = characteristics : characteristic_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>How many distinct characteristic names does the product "cumin" have?</question>
[SQL]:
| <SQL_QUERY>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"</SQL_QUERY> | 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" | How many distinct characteristic names does the product "cumin" have? | [Schema (values) (types)]: | products_gen_characteristics | Ref_Characteristic_Types : characteristic_type_code (text) , characteristic_type_description (text) | Ref_Colors : color_code (text) , color_description (text) | Ref_Product_Categories : product_category_code (text) , product_category_description (text) , unit_of_measure (text) | Characteristics : characteristic_id (text) , characteristic_type_code (text) , characteristic_data_type (text) , characteristic_name (text) , other_characteristic_details (text) | Products : product_id (text) , color_code (text) , product_category_code (text) , product_name (text) , typical_buying_price (text) , typical_selling_price (text) , product_description (text) , other_product_details (text) | Product_Characteristics : product_id (text) , characteristic_id (text) , product_characteristic_value (text); | [Primary Keys]: ref_characteristic_types : characteristic_type_code, ref_colors : color_code, ref_product_categories : product_category_code, characteristics : characteristic_id, products : product_id | [Foreign Keys]: characteristics : characteristic_type_code = ref_characteristic_types : characteristic_type_code | products : color_code = ref_colors : color_code | products : product_category_code = ref_product_categories : product_category_code | product_characteristics : product_id = products : product_id | product_characteristics : characteristic_id = characteristics : characteristic_id |
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | products_gen_characteristics | Ref_Characteristic_Types : characteristic_type_code (text) , characteristic_type_description (text) | Ref_Colors : color_code (text) , color_description (text) | Ref_Product_Categories : product_category_code (text) , product_category_description (text) , unit_of_measure (text) | Characteristics : characteristic_id (text) , characteristic_type_code (text) , characteristic_data_type (text) , characteristic_name (text) , other_characteristic_details (text) | Products : product_id (text) , color_code (text) , product_category_code (text) , product_name (text) , typical_buying_price (text) , typical_selling_price (text) , product_description (text) , other_product_details (text) | Product_Characteristics : product_id (text) , characteristic_id (text) , product_characteristic_value (text);</schema>"
<primary_keys>[Primary Keys]: ref_characteristic_types : characteristic_type_code, ref_colors : color_code, ref_product_categories : product_category_code, characteristics : characteristic_id, products : product_id</primary_keys>"
<foreign_keys>[Foreign Keys]: characteristics : characteristic_type_code = ref_characteristic_types : characteristic_type_code | products : color_code = ref_colors : color_code | products : product_category_code = ref_product_categories : product_category_code | product_characteristics : product_id = products : product_id | product_characteristics : characteristic_id = characteristics : characteristic_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>Count the number of different characteristic names the product 'cumin' has.</question>
[SQL]:
| <SQL_QUERY>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"</SQL_QUERY> | 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" | Count the number of different characteristic names the product 'cumin' has. | [Schema (values) (types)]: | products_gen_characteristics | Ref_Characteristic_Types : characteristic_type_code (text) , characteristic_type_description (text) | Ref_Colors : color_code (text) , color_description (text) | Ref_Product_Categories : product_category_code (text) , product_category_description (text) , unit_of_measure (text) | Characteristics : characteristic_id (text) , characteristic_type_code (text) , characteristic_data_type (text) , characteristic_name (text) , other_characteristic_details (text) | Products : product_id (text) , color_code (text) , product_category_code (text) , product_name (text) , typical_buying_price (text) , typical_selling_price (text) , product_description (text) , other_product_details (text) | Product_Characteristics : product_id (text) , characteristic_id (text) , product_characteristic_value (text); | [Primary Keys]: ref_characteristic_types : characteristic_type_code, ref_colors : color_code, ref_product_categories : product_category_code, characteristics : characteristic_id, products : product_id | [Foreign Keys]: characteristics : characteristic_type_code = ref_characteristic_types : characteristic_type_code | products : color_code = ref_colors : color_code | products : product_category_code = ref_product_categories : product_category_code | product_characteristics : product_id = products : product_id | product_characteristics : characteristic_id = characteristics : characteristic_id |
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | products_gen_characteristics | Ref_Characteristic_Types : characteristic_type_code (text) , characteristic_type_description (text) | Ref_Colors : color_code (text) , color_description (text) | Ref_Product_Categories : product_category_code (text) , product_category_description (text) , unit_of_measure (text) | Characteristics : characteristic_id (text) , characteristic_type_code (text) , characteristic_data_type (text) , characteristic_name (text) , other_characteristic_details (text) | Products : product_id (text) , color_code (text) , product_category_code (text) , product_name (text) , typical_buying_price (text) , typical_selling_price (text) , product_description (text) , other_product_details (text) | Product_Characteristics : product_id (text) , characteristic_id (text) , product_characteristic_value (text);</schema>"
<primary_keys>[Primary Keys]: ref_characteristic_types : characteristic_type_code, ref_colors : color_code, ref_product_categories : product_category_code, characteristics : characteristic_id, products : product_id</primary_keys>"
<foreign_keys>[Foreign Keys]: characteristics : characteristic_type_code = ref_characteristic_types : characteristic_type_code | products : color_code = ref_colors : color_code | products : product_category_code = ref_product_categories : product_category_code | product_characteristics : product_id = products : product_id | product_characteristics : characteristic_id = characteristics : characteristic_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>What are all the characteristic names of product "sesame"?</question>
[SQL]:
| <SQL_QUERY>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"</SQL_QUERY> | 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" | What are all the characteristic names of product "sesame"? | [Schema (values) (types)]: | products_gen_characteristics | Ref_Characteristic_Types : characteristic_type_code (text) , characteristic_type_description (text) | Ref_Colors : color_code (text) , color_description (text) | Ref_Product_Categories : product_category_code (text) , product_category_description (text) , unit_of_measure (text) | Characteristics : characteristic_id (text) , characteristic_type_code (text) , characteristic_data_type (text) , characteristic_name (text) , other_characteristic_details (text) | Products : product_id (text) , color_code (text) , product_category_code (text) , product_name (text) , typical_buying_price (text) , typical_selling_price (text) , product_description (text) , other_product_details (text) | Product_Characteristics : product_id (text) , characteristic_id (text) , product_characteristic_value (text); | [Primary Keys]: ref_characteristic_types : characteristic_type_code, ref_colors : color_code, ref_product_categories : product_category_code, characteristics : characteristic_id, products : product_id | [Foreign Keys]: characteristics : characteristic_type_code = ref_characteristic_types : characteristic_type_code | products : color_code = ref_colors : color_code | products : product_category_code = ref_product_categories : product_category_code | product_characteristics : product_id = products : product_id | product_characteristics : characteristic_id = characteristics : characteristic_id |
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | products_gen_characteristics | Ref_Characteristic_Types : characteristic_type_code (text) , characteristic_type_description (text) | Ref_Colors : color_code (text) , color_description (text) | Ref_Product_Categories : product_category_code (text) , product_category_description (text) , unit_of_measure (text) | Characteristics : characteristic_id (text) , characteristic_type_code (text) , characteristic_data_type (text) , characteristic_name (text) , other_characteristic_details (text) | Products : product_id (text) , color_code (text) , product_category_code (text) , product_name (text) , typical_buying_price (text) , typical_selling_price (text) , product_description (text) , other_product_details (text) | Product_Characteristics : product_id (text) , characteristic_id (text) , product_characteristic_value (text);</schema>"
<primary_keys>[Primary Keys]: ref_characteristic_types : characteristic_type_code, ref_colors : color_code, ref_product_categories : product_category_code, characteristics : characteristic_id, products : product_id</primary_keys>"
<foreign_keys>[Foreign Keys]: characteristics : characteristic_type_code = ref_characteristic_types : characteristic_type_code | products : color_code = ref_colors : color_code | products : product_category_code = ref_product_categories : product_category_code | product_characteristics : product_id = products : product_id | product_characteristics : characteristic_id = characteristics : characteristic_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>Return the characteristic names of the 'sesame' product.</question>
[SQL]:
| <SQL_QUERY>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"</SQL_QUERY> | 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" | Return the characteristic names of the 'sesame' product. | [Schema (values) (types)]: | products_gen_characteristics | Ref_Characteristic_Types : characteristic_type_code (text) , characteristic_type_description (text) | Ref_Colors : color_code (text) , color_description (text) | Ref_Product_Categories : product_category_code (text) , product_category_description (text) , unit_of_measure (text) | Characteristics : characteristic_id (text) , characteristic_type_code (text) , characteristic_data_type (text) , characteristic_name (text) , other_characteristic_details (text) | Products : product_id (text) , color_code (text) , product_category_code (text) , product_name (text) , typical_buying_price (text) , typical_selling_price (text) , product_description (text) , other_product_details (text) | Product_Characteristics : product_id (text) , characteristic_id (text) , product_characteristic_value (text); | [Primary Keys]: ref_characteristic_types : characteristic_type_code, ref_colors : color_code, ref_product_categories : product_category_code, characteristics : characteristic_id, products : product_id | [Foreign Keys]: characteristics : characteristic_type_code = ref_characteristic_types : characteristic_type_code | products : color_code = ref_colors : color_code | products : product_category_code = ref_product_categories : product_category_code | product_characteristics : product_id = products : product_id | product_characteristics : characteristic_id = characteristics : characteristic_id |
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | products_gen_characteristics | Ref_Characteristic_Types : characteristic_type_code (text) , characteristic_type_description (text) | Ref_Colors : color_code (text) , color_description (text) | Ref_Product_Categories : product_category_code (text) , product_category_description (text) , unit_of_measure (text) | Characteristics : characteristic_id (text) , characteristic_type_code (text) , characteristic_data_type (text) , characteristic_name (text) , other_characteristic_details (text) | Products : product_id (text) , color_code (text) , product_category_code (text) , product_name (text) , typical_buying_price (text) , typical_selling_price (text) , product_description (text) , other_product_details (text) | Product_Characteristics : product_id (text) , characteristic_id (text) , product_characteristic_value (text);</schema>"
<primary_keys>[Primary Keys]: ref_characteristic_types : characteristic_type_code, ref_colors : color_code, ref_product_categories : product_category_code, characteristics : characteristic_id, products : product_id</primary_keys>"
<foreign_keys>[Foreign Keys]: characteristics : characteristic_type_code = ref_characteristic_types : characteristic_type_code | products : color_code = ref_colors : color_code | products : product_category_code = ref_product_categories : product_category_code | product_characteristics : product_id = products : product_id | product_characteristics : characteristic_id = characteristics : characteristic_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>List all the characteristic names and data types of product "cumin".</question>
[SQL]:
| <SQL_QUERY>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"</SQL_QUERY> | 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" | List all the characteristic names and data types of product "cumin". | [Schema (values) (types)]: | products_gen_characteristics | Ref_Characteristic_Types : characteristic_type_code (text) , characteristic_type_description (text) | Ref_Colors : color_code (text) , color_description (text) | Ref_Product_Categories : product_category_code (text) , product_category_description (text) , unit_of_measure (text) | Characteristics : characteristic_id (text) , characteristic_type_code (text) , characteristic_data_type (text) , characteristic_name (text) , other_characteristic_details (text) | Products : product_id (text) , color_code (text) , product_category_code (text) , product_name (text) , typical_buying_price (text) , typical_selling_price (text) , product_description (text) , other_product_details (text) | Product_Characteristics : product_id (text) , characteristic_id (text) , product_characteristic_value (text); | [Primary Keys]: ref_characteristic_types : characteristic_type_code, ref_colors : color_code, ref_product_categories : product_category_code, characteristics : characteristic_id, products : product_id | [Foreign Keys]: characteristics : characteristic_type_code = ref_characteristic_types : characteristic_type_code | products : color_code = ref_colors : color_code | products : product_category_code = ref_product_categories : product_category_code | product_characteristics : product_id = products : product_id | product_characteristics : characteristic_id = characteristics : characteristic_id |
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | products_gen_characteristics | Ref_Characteristic_Types : characteristic_type_code (text) , characteristic_type_description (text) | Ref_Colors : color_code (text) , color_description (text) | Ref_Product_Categories : product_category_code (text) , product_category_description (text) , unit_of_measure (text) | Characteristics : characteristic_id (text) , characteristic_type_code (text) , characteristic_data_type (text) , characteristic_name (text) , other_characteristic_details (text) | Products : product_id (text) , color_code (text) , product_category_code (text) , product_name (text) , typical_buying_price (text) , typical_selling_price (text) , product_description (text) , other_product_details (text) | Product_Characteristics : product_id (text) , characteristic_id (text) , product_characteristic_value (text);</schema>"
<primary_keys>[Primary Keys]: ref_characteristic_types : characteristic_type_code, ref_colors : color_code, ref_product_categories : product_category_code, characteristics : characteristic_id, products : product_id</primary_keys>"
<foreign_keys>[Foreign Keys]: characteristics : characteristic_type_code = ref_characteristic_types : characteristic_type_code | products : color_code = ref_colors : color_code | products : product_category_code = ref_product_categories : product_category_code | product_characteristics : product_id = products : product_id | product_characteristics : characteristic_id = characteristics : characteristic_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>What are the names and data types of the characteristics of the 'cumin' product?</question>
[SQL]:
| <SQL_QUERY>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"</SQL_QUERY> | 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" | What are the names and data types of the characteristics of the 'cumin' product? | [Schema (values) (types)]: | products_gen_characteristics | Ref_Characteristic_Types : characteristic_type_code (text) , characteristic_type_description (text) | Ref_Colors : color_code (text) , color_description (text) | Ref_Product_Categories : product_category_code (text) , product_category_description (text) , unit_of_measure (text) | Characteristics : characteristic_id (text) , characteristic_type_code (text) , characteristic_data_type (text) , characteristic_name (text) , other_characteristic_details (text) | Products : product_id (text) , color_code (text) , product_category_code (text) , product_name (text) , typical_buying_price (text) , typical_selling_price (text) , product_description (text) , other_product_details (text) | Product_Characteristics : product_id (text) , characteristic_id (text) , product_characteristic_value (text); | [Primary Keys]: ref_characteristic_types : characteristic_type_code, ref_colors : color_code, ref_product_categories : product_category_code, characteristics : characteristic_id, products : product_id | [Foreign Keys]: characteristics : characteristic_type_code = ref_characteristic_types : characteristic_type_code | products : color_code = ref_colors : color_code | products : product_category_code = ref_product_categories : product_category_code | product_characteristics : product_id = products : product_id | product_characteristics : characteristic_id = characteristics : characteristic_id |
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | products_gen_characteristics | Ref_Characteristic_Types : characteristic_type_code (text) , characteristic_type_description (text) | Ref_Colors : color_code (text) , color_description (text) | Ref_Product_Categories : product_category_code (text) , product_category_description (text) , unit_of_measure (text) | Characteristics : characteristic_id (text) , characteristic_type_code (text) , characteristic_data_type (text) , characteristic_name (text) , other_characteristic_details (text) | Products : product_id (text) , color_code (text) , product_category_code (text) , product_name (text) , typical_buying_price (text) , typical_selling_price (text) , product_description (text) , other_product_details (text) | Product_Characteristics : product_id (text) , characteristic_id (text) , product_characteristic_value (text);</schema>"
<primary_keys>[Primary Keys]: ref_characteristic_types : characteristic_type_code, ref_colors : color_code, ref_product_categories : product_category_code, characteristics : characteristic_id, products : product_id</primary_keys>"
<foreign_keys>[Foreign Keys]: characteristics : characteristic_type_code = ref_characteristic_types : characteristic_type_code | products : color_code = ref_colors : color_code | products : product_category_code = ref_product_categories : product_category_code | product_characteristics : product_id = products : product_id | product_characteristics : characteristic_id = characteristics : characteristic_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>List all characteristics of product named "sesame" with type code "Grade".</question>
[SQL]:
| <SQL_QUERY>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"</SQL_QUERY> | 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" | List all characteristics of product named "sesame" with type code "Grade". | [Schema (values) (types)]: | products_gen_characteristics | Ref_Characteristic_Types : characteristic_type_code (text) , characteristic_type_description (text) | Ref_Colors : color_code (text) , color_description (text) | Ref_Product_Categories : product_category_code (text) , product_category_description (text) , unit_of_measure (text) | Characteristics : characteristic_id (text) , characteristic_type_code (text) , characteristic_data_type (text) , characteristic_name (text) , other_characteristic_details (text) | Products : product_id (text) , color_code (text) , product_category_code (text) , product_name (text) , typical_buying_price (text) , typical_selling_price (text) , product_description (text) , other_product_details (text) | Product_Characteristics : product_id (text) , characteristic_id (text) , product_characteristic_value (text); | [Primary Keys]: ref_characteristic_types : characteristic_type_code, ref_colors : color_code, ref_product_categories : product_category_code, characteristics : characteristic_id, products : product_id | [Foreign Keys]: characteristics : characteristic_type_code = ref_characteristic_types : characteristic_type_code | products : color_code = ref_colors : color_code | products : product_category_code = ref_product_categories : product_category_code | product_characteristics : product_id = products : product_id | product_characteristics : characteristic_id = characteristics : characteristic_id |
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | products_gen_characteristics | Ref_Characteristic_Types : characteristic_type_code (text) , characteristic_type_description (text) | Ref_Colors : color_code (text) , color_description (text) | Ref_Product_Categories : product_category_code (text) , product_category_description (text) , unit_of_measure (text) | Characteristics : characteristic_id (text) , characteristic_type_code (text) , characteristic_data_type (text) , characteristic_name (text) , other_characteristic_details (text) | Products : product_id (text) , color_code (text) , product_category_code (text) , product_name (text) , typical_buying_price (text) , typical_selling_price (text) , product_description (text) , other_product_details (text) | Product_Characteristics : product_id (text) , characteristic_id (text) , product_characteristic_value (text);</schema>"
<primary_keys>[Primary Keys]: ref_characteristic_types : characteristic_type_code, ref_colors : color_code, ref_product_categories : product_category_code, characteristics : characteristic_id, products : product_id</primary_keys>"
<foreign_keys>[Foreign Keys]: characteristics : characteristic_type_code = ref_characteristic_types : characteristic_type_code | products : color_code = ref_colors : color_code | products : product_category_code = ref_product_categories : product_category_code | product_characteristics : product_id = products : product_id | product_characteristics : characteristic_id = characteristics : characteristic_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>What are the names of the characteristics of the product 'sesame' that have the characteristic type code 'Grade'?</question>
[SQL]:
| <SQL_QUERY>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"</SQL_QUERY> | 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" | What are the names of the characteristics of the product 'sesame' that have the characteristic type code 'Grade'? | [Schema (values) (types)]: | products_gen_characteristics | Ref_Characteristic_Types : characteristic_type_code (text) , characteristic_type_description (text) | Ref_Colors : color_code (text) , color_description (text) | Ref_Product_Categories : product_category_code (text) , product_category_description (text) , unit_of_measure (text) | Characteristics : characteristic_id (text) , characteristic_type_code (text) , characteristic_data_type (text) , characteristic_name (text) , other_characteristic_details (text) | Products : product_id (text) , color_code (text) , product_category_code (text) , product_name (text) , typical_buying_price (text) , typical_selling_price (text) , product_description (text) , other_product_details (text) | Product_Characteristics : product_id (text) , characteristic_id (text) , product_characteristic_value (text); | [Primary Keys]: ref_characteristic_types : characteristic_type_code, ref_colors : color_code, ref_product_categories : product_category_code, characteristics : characteristic_id, products : product_id | [Foreign Keys]: characteristics : characteristic_type_code = ref_characteristic_types : characteristic_type_code | products : color_code = ref_colors : color_code | products : product_category_code = ref_product_categories : product_category_code | product_characteristics : product_id = products : product_id | product_characteristics : characteristic_id = characteristics : characteristic_id |
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | products_gen_characteristics | Ref_Characteristic_Types : characteristic_type_code (text) , characteristic_type_description (text) | Ref_Colors : color_code (text) , color_description (text) | Ref_Product_Categories : product_category_code (text) , product_category_description (text) , unit_of_measure (text) | Characteristics : characteristic_id (text) , characteristic_type_code (text) , characteristic_data_type (text) , characteristic_name (text) , other_characteristic_details (text) | Products : product_id (text) , color_code (text) , product_category_code (text) , product_name (text) , typical_buying_price (text) , typical_selling_price (text) , product_description (text) , other_product_details (text) | Product_Characteristics : product_id (text) , characteristic_id (text) , product_characteristic_value (text);</schema>"
<primary_keys>[Primary Keys]: ref_characteristic_types : characteristic_type_code, ref_colors : color_code, ref_product_categories : product_category_code, characteristics : characteristic_id, products : product_id</primary_keys>"
<foreign_keys>[Foreign Keys]: characteristics : characteristic_type_code = ref_characteristic_types : characteristic_type_code | products : color_code = ref_colors : color_code | products : product_category_code = ref_product_categories : product_category_code | product_characteristics : product_id = products : product_id | product_characteristics : characteristic_id = characteristics : characteristic_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>How many characteristics does the product named "laurel" have?</question>
[SQL]:
| <SQL_QUERY>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"</SQL_QUERY> | 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" | How many characteristics does the product named "laurel" have? | [Schema (values) (types)]: | products_gen_characteristics | Ref_Characteristic_Types : characteristic_type_code (text) , characteristic_type_description (text) | Ref_Colors : color_code (text) , color_description (text) | Ref_Product_Categories : product_category_code (text) , product_category_description (text) , unit_of_measure (text) | Characteristics : characteristic_id (text) , characteristic_type_code (text) , characteristic_data_type (text) , characteristic_name (text) , other_characteristic_details (text) | Products : product_id (text) , color_code (text) , product_category_code (text) , product_name (text) , typical_buying_price (text) , typical_selling_price (text) , product_description (text) , other_product_details (text) | Product_Characteristics : product_id (text) , characteristic_id (text) , product_characteristic_value (text); | [Primary Keys]: ref_characteristic_types : characteristic_type_code, ref_colors : color_code, ref_product_categories : product_category_code, characteristics : characteristic_id, products : product_id | [Foreign Keys]: characteristics : characteristic_type_code = ref_characteristic_types : characteristic_type_code | products : color_code = ref_colors : color_code | products : product_category_code = ref_product_categories : product_category_code | product_characteristics : product_id = products : product_id | product_characteristics : characteristic_id = characteristics : characteristic_id |
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | products_gen_characteristics | Ref_Characteristic_Types : characteristic_type_code (text) , characteristic_type_description (text) | Ref_Colors : color_code (text) , color_description (text) | Ref_Product_Categories : product_category_code (text) , product_category_description (text) , unit_of_measure (text) | Characteristics : characteristic_id (text) , characteristic_type_code (text) , characteristic_data_type (text) , characteristic_name (text) , other_characteristic_details (text) | Products : product_id (text) , color_code (text) , product_category_code (text) , product_name (text) , typical_buying_price (text) , typical_selling_price (text) , product_description (text) , other_product_details (text) | Product_Characteristics : product_id (text) , characteristic_id (text) , product_characteristic_value (text);</schema>"
<primary_keys>[Primary Keys]: ref_characteristic_types : characteristic_type_code, ref_colors : color_code, ref_product_categories : product_category_code, characteristics : characteristic_id, products : product_id</primary_keys>"
<foreign_keys>[Foreign Keys]: characteristics : characteristic_type_code = ref_characteristic_types : characteristic_type_code | products : color_code = ref_colors : color_code | products : product_category_code = ref_product_categories : product_category_code | product_characteristics : product_id = products : product_id | product_characteristics : characteristic_id = characteristics : characteristic_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>Count the number of characteristics of the product named 'laurel'.</question>
[SQL]:
| <SQL_QUERY>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"</SQL_QUERY> | 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" | Count the number of characteristics of the product named 'laurel'. | [Schema (values) (types)]: | products_gen_characteristics | Ref_Characteristic_Types : characteristic_type_code (text) , characteristic_type_description (text) | Ref_Colors : color_code (text) , color_description (text) | Ref_Product_Categories : product_category_code (text) , product_category_description (text) , unit_of_measure (text) | Characteristics : characteristic_id (text) , characteristic_type_code (text) , characteristic_data_type (text) , characteristic_name (text) , other_characteristic_details (text) | Products : product_id (text) , color_code (text) , product_category_code (text) , product_name (text) , typical_buying_price (text) , typical_selling_price (text) , product_description (text) , other_product_details (text) | Product_Characteristics : product_id (text) , characteristic_id (text) , product_characteristic_value (text); | [Primary Keys]: ref_characteristic_types : characteristic_type_code, ref_colors : color_code, ref_product_categories : product_category_code, characteristics : characteristic_id, products : product_id | [Foreign Keys]: characteristics : characteristic_type_code = ref_characteristic_types : characteristic_type_code | products : color_code = ref_colors : color_code | products : product_category_code = ref_product_categories : product_category_code | product_characteristics : product_id = products : product_id | product_characteristics : characteristic_id = characteristics : characteristic_id |
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | products_gen_characteristics | Ref_Characteristic_Types : characteristic_type_code (text) , characteristic_type_description (text) | Ref_Colors : color_code (text) , color_description (text) | Ref_Product_Categories : product_category_code (text) , product_category_description (text) , unit_of_measure (text) | Characteristics : characteristic_id (text) , characteristic_type_code (text) , characteristic_data_type (text) , characteristic_name (text) , other_characteristic_details (text) | Products : product_id (text) , color_code (text) , product_category_code (text) , product_name (text) , typical_buying_price (text) , typical_selling_price (text) , product_description (text) , other_product_details (text) | Product_Characteristics : product_id (text) , characteristic_id (text) , product_characteristic_value (text);</schema>"
<primary_keys>[Primary Keys]: ref_characteristic_types : characteristic_type_code, ref_colors : color_code, ref_product_categories : product_category_code, characteristics : characteristic_id, products : product_id</primary_keys>"
<foreign_keys>[Foreign Keys]: characteristics : characteristic_type_code = ref_characteristic_types : characteristic_type_code | products : color_code = ref_colors : color_code | products : product_category_code = ref_product_categories : product_category_code | product_characteristics : product_id = products : product_id | product_characteristics : characteristic_id = characteristics : characteristic_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>Find the number of characteristics that the product "flax" has.</question>
[SQL]:
| <SQL_QUERY>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"</SQL_QUERY> | 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" | Find the number of characteristics that the product "flax" has. | [Schema (values) (types)]: | products_gen_characteristics | Ref_Characteristic_Types : characteristic_type_code (text) , characteristic_type_description (text) | Ref_Colors : color_code (text) , color_description (text) | Ref_Product_Categories : product_category_code (text) , product_category_description (text) , unit_of_measure (text) | Characteristics : characteristic_id (text) , characteristic_type_code (text) , characteristic_data_type (text) , characteristic_name (text) , other_characteristic_details (text) | Products : product_id (text) , color_code (text) , product_category_code (text) , product_name (text) , typical_buying_price (text) , typical_selling_price (text) , product_description (text) , other_product_details (text) | Product_Characteristics : product_id (text) , characteristic_id (text) , product_characteristic_value (text); | [Primary Keys]: ref_characteristic_types : characteristic_type_code, ref_colors : color_code, ref_product_categories : product_category_code, characteristics : characteristic_id, products : product_id | [Foreign Keys]: characteristics : characteristic_type_code = ref_characteristic_types : characteristic_type_code | products : color_code = ref_colors : color_code | products : product_category_code = ref_product_categories : product_category_code | product_characteristics : product_id = products : product_id | product_characteristics : characteristic_id = characteristics : characteristic_id |
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | products_gen_characteristics | Ref_Characteristic_Types : characteristic_type_code (text) , characteristic_type_description (text) | Ref_Colors : color_code (text) , color_description (text) | Ref_Product_Categories : product_category_code (text) , product_category_description (text) , unit_of_measure (text) | Characteristics : characteristic_id (text) , characteristic_type_code (text) , characteristic_data_type (text) , characteristic_name (text) , other_characteristic_details (text) | Products : product_id (text) , color_code (text) , product_category_code (text) , product_name (text) , typical_buying_price (text) , typical_selling_price (text) , product_description (text) , other_product_details (text) | Product_Characteristics : product_id (text) , characteristic_id (text) , product_characteristic_value (text);</schema>"
<primary_keys>[Primary Keys]: ref_characteristic_types : characteristic_type_code, ref_colors : color_code, ref_product_categories : product_category_code, characteristics : characteristic_id, products : product_id</primary_keys>"
<foreign_keys>[Foreign Keys]: characteristics : characteristic_type_code = ref_characteristic_types : characteristic_type_code | products : color_code = ref_colors : color_code | products : product_category_code = ref_product_categories : product_category_code | product_characteristics : product_id = products : product_id | product_characteristics : characteristic_id = characteristics : characteristic_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>Count the number of characteristics of the 'flax' product.</question>
[SQL]:
| <SQL_QUERY>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"</SQL_QUERY> | 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" | Count the number of characteristics of the 'flax' product. | [Schema (values) (types)]: | products_gen_characteristics | Ref_Characteristic_Types : characteristic_type_code (text) , characteristic_type_description (text) | Ref_Colors : color_code (text) , color_description (text) | Ref_Product_Categories : product_category_code (text) , product_category_description (text) , unit_of_measure (text) | Characteristics : characteristic_id (text) , characteristic_type_code (text) , characteristic_data_type (text) , characteristic_name (text) , other_characteristic_details (text) | Products : product_id (text) , color_code (text) , product_category_code (text) , product_name (text) , typical_buying_price (text) , typical_selling_price (text) , product_description (text) , other_product_details (text) | Product_Characteristics : product_id (text) , characteristic_id (text) , product_characteristic_value (text); | [Primary Keys]: ref_characteristic_types : characteristic_type_code, ref_colors : color_code, ref_product_categories : product_category_code, characteristics : characteristic_id, products : product_id | [Foreign Keys]: characteristics : characteristic_type_code = ref_characteristic_types : characteristic_type_code | products : color_code = ref_colors : color_code | products : product_category_code = ref_product_categories : product_category_code | product_characteristics : product_id = products : product_id | product_characteristics : characteristic_id = characteristics : characteristic_id |
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | products_gen_characteristics | Ref_Characteristic_Types : characteristic_type_code (text) , characteristic_type_description (text) | Ref_Colors : color_code (text) , color_description (text) | Ref_Product_Categories : product_category_code (text) , product_category_description (text) , unit_of_measure (text) | Characteristics : characteristic_id (text) , characteristic_type_code (text) , characteristic_data_type (text) , characteristic_name (text) , other_characteristic_details (text) | Products : product_id (text) , color_code (text) , product_category_code (text) , product_name (text) , typical_buying_price (text) , typical_selling_price (text) , product_description (text) , other_product_details (text) | Product_Characteristics : product_id (text) , characteristic_id (text) , product_characteristic_value (text);</schema>"
<primary_keys>[Primary Keys]: ref_characteristic_types : characteristic_type_code, ref_colors : color_code, ref_product_categories : product_category_code, characteristics : characteristic_id, products : product_id</primary_keys>"
<foreign_keys>[Foreign Keys]: characteristics : characteristic_type_code = ref_characteristic_types : characteristic_type_code | products : color_code = ref_colors : color_code | products : product_category_code = ref_product_categories : product_category_code | product_characteristics : product_id = products : product_id | product_characteristics : characteristic_id = characteristics : characteristic_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>Find the name of the products that have the color description "red" and have the characteristic name "fast".</question>
[SQL]:
| <SQL_QUERY>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"</SQL_QUERY> | 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" | Find the name of the products that have the color description "red" and have the characteristic name "fast". | [Schema (values) (types)]: | products_gen_characteristics | Ref_Characteristic_Types : characteristic_type_code (text) , characteristic_type_description (text) | Ref_Colors : color_code (text) , color_description (text) | Ref_Product_Categories : product_category_code (text) , product_category_description (text) , unit_of_measure (text) | Characteristics : characteristic_id (text) , characteristic_type_code (text) , characteristic_data_type (text) , characteristic_name (text) , other_characteristic_details (text) | Products : product_id (text) , color_code (text) , product_category_code (text) , product_name (text) , typical_buying_price (text) , typical_selling_price (text) , product_description (text) , other_product_details (text) | Product_Characteristics : product_id (text) , characteristic_id (text) , product_characteristic_value (text); | [Primary Keys]: ref_characteristic_types : characteristic_type_code, ref_colors : color_code, ref_product_categories : product_category_code, characteristics : characteristic_id, products : product_id | [Foreign Keys]: characteristics : characteristic_type_code = ref_characteristic_types : characteristic_type_code | products : color_code = ref_colors : color_code | products : product_category_code = ref_product_categories : product_category_code | product_characteristics : product_id = products : product_id | product_characteristics : characteristic_id = characteristics : characteristic_id |
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | products_gen_characteristics | Ref_Characteristic_Types : characteristic_type_code (text) , characteristic_type_description (text) | Ref_Colors : color_code (text) , color_description (text) | Ref_Product_Categories : product_category_code (text) , product_category_description (text) , unit_of_measure (text) | Characteristics : characteristic_id (text) , characteristic_type_code (text) , characteristic_data_type (text) , characteristic_name (text) , other_characteristic_details (text) | Products : product_id (text) , color_code (text) , product_category_code (text) , product_name (text) , typical_buying_price (text) , typical_selling_price (text) , product_description (text) , other_product_details (text) | Product_Characteristics : product_id (text) , characteristic_id (text) , product_characteristic_value (text);</schema>"
<primary_keys>[Primary Keys]: ref_characteristic_types : characteristic_type_code, ref_colors : color_code, ref_product_categories : product_category_code, characteristics : characteristic_id, products : product_id</primary_keys>"
<foreign_keys>[Foreign Keys]: characteristics : characteristic_type_code = ref_characteristic_types : characteristic_type_code | products : color_code = ref_colors : color_code | products : product_category_code = ref_product_categories : product_category_code | product_characteristics : product_id = products : product_id | product_characteristics : characteristic_id = characteristics : characteristic_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>What are the names of the products that have a color description of 'red' and the 'fast' characteristic?</question>
[SQL]:
| <SQL_QUERY>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"</SQL_QUERY> | 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" | What are the names of the products that have a color description of 'red' and the 'fast' characteristic? | [Schema (values) (types)]: | products_gen_characteristics | Ref_Characteristic_Types : characteristic_type_code (text) , characteristic_type_description (text) | Ref_Colors : color_code (text) , color_description (text) | Ref_Product_Categories : product_category_code (text) , product_category_description (text) , unit_of_measure (text) | Characteristics : characteristic_id (text) , characteristic_type_code (text) , characteristic_data_type (text) , characteristic_name (text) , other_characteristic_details (text) | Products : product_id (text) , color_code (text) , product_category_code (text) , product_name (text) , typical_buying_price (text) , typical_selling_price (text) , product_description (text) , other_product_details (text) | Product_Characteristics : product_id (text) , characteristic_id (text) , product_characteristic_value (text); | [Primary Keys]: ref_characteristic_types : characteristic_type_code, ref_colors : color_code, ref_product_categories : product_category_code, characteristics : characteristic_id, products : product_id | [Foreign Keys]: characteristics : characteristic_type_code = ref_characteristic_types : characteristic_type_code | products : color_code = ref_colors : color_code | products : product_category_code = ref_product_categories : product_category_code | product_characteristics : product_id = products : product_id | product_characteristics : characteristic_id = characteristics : characteristic_id |
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | products_gen_characteristics | Ref_Characteristic_Types : characteristic_type_code (text) , characteristic_type_description (text) | Ref_Colors : color_code (text) , color_description (text) | Ref_Product_Categories : product_category_code (text) , product_category_description (text) , unit_of_measure (text) | Characteristics : characteristic_id (text) , characteristic_type_code (text) , characteristic_data_type (text) , characteristic_name (text) , other_characteristic_details (text) | Products : product_id (text) , color_code (text) , product_category_code (text) , product_name (text) , typical_buying_price (text) , typical_selling_price (text) , product_description (text) , other_product_details (text) | Product_Characteristics : product_id (text) , characteristic_id (text) , product_characteristic_value (text);</schema>"
<primary_keys>[Primary Keys]: ref_characteristic_types : characteristic_type_code, ref_colors : color_code, ref_product_categories : product_category_code, characteristics : characteristic_id, products : product_id</primary_keys>"
<foreign_keys>[Foreign Keys]: characteristics : characteristic_type_code = ref_characteristic_types : characteristic_type_code | products : color_code = ref_colors : color_code | products : product_category_code = ref_product_categories : product_category_code | product_characteristics : product_id = products : product_id | product_characteristics : characteristic_id = characteristics : characteristic_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>How many products have the characteristic named "hot"?</question>
[SQL]:
| <SQL_QUERY>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"</SQL_QUERY> | 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" | How many products have the characteristic named "hot"? | [Schema (values) (types)]: | products_gen_characteristics | Ref_Characteristic_Types : characteristic_type_code (text) , characteristic_type_description (text) | Ref_Colors : color_code (text) , color_description (text) | Ref_Product_Categories : product_category_code (text) , product_category_description (text) , unit_of_measure (text) | Characteristics : characteristic_id (text) , characteristic_type_code (text) , characteristic_data_type (text) , characteristic_name (text) , other_characteristic_details (text) | Products : product_id (text) , color_code (text) , product_category_code (text) , product_name (text) , typical_buying_price (text) , typical_selling_price (text) , product_description (text) , other_product_details (text) | Product_Characteristics : product_id (text) , characteristic_id (text) , product_characteristic_value (text); | [Primary Keys]: ref_characteristic_types : characteristic_type_code, ref_colors : color_code, ref_product_categories : product_category_code, characteristics : characteristic_id, products : product_id | [Foreign Keys]: characteristics : characteristic_type_code = ref_characteristic_types : characteristic_type_code | products : color_code = ref_colors : color_code | products : product_category_code = ref_product_categories : product_category_code | product_characteristics : product_id = products : product_id | product_characteristics : characteristic_id = characteristics : characteristic_id |
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | products_gen_characteristics | Ref_Characteristic_Types : characteristic_type_code (text) , characteristic_type_description (text) | Ref_Colors : color_code (text) , color_description (text) | Ref_Product_Categories : product_category_code (text) , product_category_description (text) , unit_of_measure (text) | Characteristics : characteristic_id (text) , characteristic_type_code (text) , characteristic_data_type (text) , characteristic_name (text) , other_characteristic_details (text) | Products : product_id (text) , color_code (text) , product_category_code (text) , product_name (text) , typical_buying_price (text) , typical_selling_price (text) , product_description (text) , other_product_details (text) | Product_Characteristics : product_id (text) , characteristic_id (text) , product_characteristic_value (text);</schema>"
<primary_keys>[Primary Keys]: ref_characteristic_types : characteristic_type_code, ref_colors : color_code, ref_product_categories : product_category_code, characteristics : characteristic_id, products : product_id</primary_keys>"
<foreign_keys>[Foreign Keys]: characteristics : characteristic_type_code = ref_characteristic_types : characteristic_type_code | products : color_code = ref_colors : color_code | products : product_category_code = ref_product_categories : product_category_code | product_characteristics : product_id = products : product_id | product_characteristics : characteristic_id = characteristics : characteristic_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>Count the number of products with the 'hot' charactersitic.</question>
[SQL]:
| <SQL_QUERY>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"</SQL_QUERY> | 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" | Count the number of products with the 'hot' charactersitic. | [Schema (values) (types)]: | products_gen_characteristics | Ref_Characteristic_Types : characteristic_type_code (text) , characteristic_type_description (text) | Ref_Colors : color_code (text) , color_description (text) | Ref_Product_Categories : product_category_code (text) , product_category_description (text) , unit_of_measure (text) | Characteristics : characteristic_id (text) , characteristic_type_code (text) , characteristic_data_type (text) , characteristic_name (text) , other_characteristic_details (text) | Products : product_id (text) , color_code (text) , product_category_code (text) , product_name (text) , typical_buying_price (text) , typical_selling_price (text) , product_description (text) , other_product_details (text) | Product_Characteristics : product_id (text) , characteristic_id (text) , product_characteristic_value (text); | [Primary Keys]: ref_characteristic_types : characteristic_type_code, ref_colors : color_code, ref_product_categories : product_category_code, characteristics : characteristic_id, products : product_id | [Foreign Keys]: characteristics : characteristic_type_code = ref_characteristic_types : characteristic_type_code | products : color_code = ref_colors : color_code | products : product_category_code = ref_product_categories : product_category_code | product_characteristics : product_id = products : product_id | product_characteristics : characteristic_id = characteristics : characteristic_id |
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | products_gen_characteristics | Ref_Characteristic_Types : characteristic_type_code (text) , characteristic_type_description (text) | Ref_Colors : color_code (text) , color_description (text) | Ref_Product_Categories : product_category_code (text) , product_category_description (text) , unit_of_measure (text) | Characteristics : characteristic_id (text) , characteristic_type_code (text) , characteristic_data_type (text) , characteristic_name (text) , other_characteristic_details (text) | Products : product_id (text) , color_code (text) , product_category_code (text) , product_name (text) , typical_buying_price (text) , typical_selling_price (text) , product_description (text) , other_product_details (text) | Product_Characteristics : product_id (text) , characteristic_id (text) , product_characteristic_value (text);</schema>"
<primary_keys>[Primary Keys]: ref_characteristic_types : characteristic_type_code, ref_colors : color_code, ref_product_categories : product_category_code, characteristics : characteristic_id, products : product_id</primary_keys>"
<foreign_keys>[Foreign Keys]: characteristics : characteristic_type_code = ref_characteristic_types : characteristic_type_code | products : color_code = ref_colors : color_code | products : product_category_code = ref_product_categories : product_category_code | product_characteristics : product_id = products : product_id | product_characteristics : characteristic_id = characteristics : characteristic_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>List the all the distinct names of the products with the characteristic name 'warm'.</question>
[SQL]:
| <SQL_QUERY>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"</SQL_QUERY> | 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" | List the all the distinct names of the products with the characteristic name 'warm'. | [Schema (values) (types)]: | products_gen_characteristics | Ref_Characteristic_Types : characteristic_type_code (text) , characteristic_type_description (text) | Ref_Colors : color_code (text) , color_description (text) | Ref_Product_Categories : product_category_code (text) , product_category_description (text) , unit_of_measure (text) | Characteristics : characteristic_id (text) , characteristic_type_code (text) , characteristic_data_type (text) , characteristic_name (text) , other_characteristic_details (text) | Products : product_id (text) , color_code (text) , product_category_code (text) , product_name (text) , typical_buying_price (text) , typical_selling_price (text) , product_description (text) , other_product_details (text) | Product_Characteristics : product_id (text) , characteristic_id (text) , product_characteristic_value (text); | [Primary Keys]: ref_characteristic_types : characteristic_type_code, ref_colors : color_code, ref_product_categories : product_category_code, characteristics : characteristic_id, products : product_id | [Foreign Keys]: characteristics : characteristic_type_code = ref_characteristic_types : characteristic_type_code | products : color_code = ref_colors : color_code | products : product_category_code = ref_product_categories : product_category_code | product_characteristics : product_id = products : product_id | product_characteristics : characteristic_id = characteristics : characteristic_id |
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | products_gen_characteristics | Ref_Characteristic_Types : characteristic_type_code (text) , characteristic_type_description (text) | Ref_Colors : color_code (text) , color_description (text) | Ref_Product_Categories : product_category_code (text) , product_category_description (text) , unit_of_measure (text) | Characteristics : characteristic_id (text) , characteristic_type_code (text) , characteristic_data_type (text) , characteristic_name (text) , other_characteristic_details (text) | Products : product_id (text) , color_code (text) , product_category_code (text) , product_name (text) , typical_buying_price (text) , typical_selling_price (text) , product_description (text) , other_product_details (text) | Product_Characteristics : product_id (text) , characteristic_id (text) , product_characteristic_value (text);</schema>"
<primary_keys>[Primary Keys]: ref_characteristic_types : characteristic_type_code, ref_colors : color_code, ref_product_categories : product_category_code, characteristics : characteristic_id, products : product_id</primary_keys>"
<foreign_keys>[Foreign Keys]: characteristics : characteristic_type_code = ref_characteristic_types : characteristic_type_code | products : color_code = ref_colors : color_code | products : product_category_code = ref_product_categories : product_category_code | product_characteristics : product_id = products : product_id | product_characteristics : characteristic_id = characteristics : characteristic_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>What are the different product names for products that have the 'warm' characteristic:?</question>
[SQL]:
| <SQL_QUERY>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"</SQL_QUERY> | 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" | What are the different product names for products that have the 'warm' characteristic:? | [Schema (values) (types)]: | products_gen_characteristics | Ref_Characteristic_Types : characteristic_type_code (text) , characteristic_type_description (text) | Ref_Colors : color_code (text) , color_description (text) | Ref_Product_Categories : product_category_code (text) , product_category_description (text) , unit_of_measure (text) | Characteristics : characteristic_id (text) , characteristic_type_code (text) , characteristic_data_type (text) , characteristic_name (text) , other_characteristic_details (text) | Products : product_id (text) , color_code (text) , product_category_code (text) , product_name (text) , typical_buying_price (text) , typical_selling_price (text) , product_description (text) , other_product_details (text) | Product_Characteristics : product_id (text) , characteristic_id (text) , product_characteristic_value (text); | [Primary Keys]: ref_characteristic_types : characteristic_type_code, ref_colors : color_code, ref_product_categories : product_category_code, characteristics : characteristic_id, products : product_id | [Foreign Keys]: characteristics : characteristic_type_code = ref_characteristic_types : characteristic_type_code | products : color_code = ref_colors : color_code | products : product_category_code = ref_product_categories : product_category_code | product_characteristics : product_id = products : product_id | product_characteristics : characteristic_id = characteristics : characteristic_id |
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | products_gen_characteristics | Ref_Characteristic_Types : characteristic_type_code (text) , characteristic_type_description (text) | Ref_Colors : color_code (text) , color_description (text) | Ref_Product_Categories : product_category_code (text) , product_category_description (text) , unit_of_measure (text) | Characteristics : characteristic_id (text) , characteristic_type_code (text) , characteristic_data_type (text) , characteristic_name (text) , other_characteristic_details (text) | Products : product_id (text) , color_code (text) , product_category_code (text) , product_name (text) , typical_buying_price (text) , typical_selling_price (text) , product_description (text) , other_product_details (text) | Product_Characteristics : product_id (text) , characteristic_id (text) , product_characteristic_value (text);</schema>"
<primary_keys>[Primary Keys]: ref_characteristic_types : characteristic_type_code, ref_colors : color_code, ref_product_categories : product_category_code, characteristics : characteristic_id, products : product_id</primary_keys>"
<foreign_keys>[Foreign Keys]: characteristics : characteristic_type_code = ref_characteristic_types : characteristic_type_code | products : color_code = ref_colors : color_code | products : product_category_code = ref_product_categories : product_category_code | product_characteristics : product_id = products : product_id | product_characteristics : characteristic_id = characteristics : characteristic_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>Find the number of the products that have their color described as "red" and have a characteristic named "slow".</question>
[SQL]:
| <SQL_QUERY>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"</SQL_QUERY> | 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" | Find the number of the products that have their color described as "red" and have a characteristic named "slow". | [Schema (values) (types)]: | products_gen_characteristics | Ref_Characteristic_Types : characteristic_type_code (text) , characteristic_type_description (text) | Ref_Colors : color_code (text) , color_description (text) | Ref_Product_Categories : product_category_code (text) , product_category_description (text) , unit_of_measure (text) | Characteristics : characteristic_id (text) , characteristic_type_code (text) , characteristic_data_type (text) , characteristic_name (text) , other_characteristic_details (text) | Products : product_id (text) , color_code (text) , product_category_code (text) , product_name (text) , typical_buying_price (text) , typical_selling_price (text) , product_description (text) , other_product_details (text) | Product_Characteristics : product_id (text) , characteristic_id (text) , product_characteristic_value (text); | [Primary Keys]: ref_characteristic_types : characteristic_type_code, ref_colors : color_code, ref_product_categories : product_category_code, characteristics : characteristic_id, products : product_id | [Foreign Keys]: characteristics : characteristic_type_code = ref_characteristic_types : characteristic_type_code | products : color_code = ref_colors : color_code | products : product_category_code = ref_product_categories : product_category_code | product_characteristics : product_id = products : product_id | product_characteristics : characteristic_id = characteristics : characteristic_id |
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | products_gen_characteristics | Ref_Characteristic_Types : characteristic_type_code (text) , characteristic_type_description (text) | Ref_Colors : color_code (text) , color_description (text) | Ref_Product_Categories : product_category_code (text) , product_category_description (text) , unit_of_measure (text) | Characteristics : characteristic_id (text) , characteristic_type_code (text) , characteristic_data_type (text) , characteristic_name (text) , other_characteristic_details (text) | Products : product_id (text) , color_code (text) , product_category_code (text) , product_name (text) , typical_buying_price (text) , typical_selling_price (text) , product_description (text) , other_product_details (text) | Product_Characteristics : product_id (text) , characteristic_id (text) , product_characteristic_value (text);</schema>"
<primary_keys>[Primary Keys]: ref_characteristic_types : characteristic_type_code, ref_colors : color_code, ref_product_categories : product_category_code, characteristics : characteristic_id, products : product_id</primary_keys>"
<foreign_keys>[Foreign Keys]: characteristics : characteristic_type_code = ref_characteristic_types : characteristic_type_code | products : color_code = ref_colors : color_code | products : product_category_code = ref_product_categories : product_category_code | product_characteristics : product_id = products : product_id | product_characteristics : characteristic_id = characteristics : characteristic_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>How many products have the color description 'red' and the characteristic name 'slow'?</question>
[SQL]:
| <SQL_QUERY>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"</SQL_QUERY> | 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" | How many products have the color description 'red' and the characteristic name 'slow'? | [Schema (values) (types)]: | products_gen_characteristics | Ref_Characteristic_Types : characteristic_type_code (text) , characteristic_type_description (text) | Ref_Colors : color_code (text) , color_description (text) | Ref_Product_Categories : product_category_code (text) , product_category_description (text) , unit_of_measure (text) | Characteristics : characteristic_id (text) , characteristic_type_code (text) , characteristic_data_type (text) , characteristic_name (text) , other_characteristic_details (text) | Products : product_id (text) , color_code (text) , product_category_code (text) , product_name (text) , typical_buying_price (text) , typical_selling_price (text) , product_description (text) , other_product_details (text) | Product_Characteristics : product_id (text) , characteristic_id (text) , product_characteristic_value (text); | [Primary Keys]: ref_characteristic_types : characteristic_type_code, ref_colors : color_code, ref_product_categories : product_category_code, characteristics : characteristic_id, products : product_id | [Foreign Keys]: characteristics : characteristic_type_code = ref_characteristic_types : characteristic_type_code | products : color_code = ref_colors : color_code | products : product_category_code = ref_product_categories : product_category_code | product_characteristics : product_id = products : product_id | product_characteristics : characteristic_id = characteristics : characteristic_id |
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | products_gen_characteristics | Ref_Characteristic_Types : characteristic_type_code (text) , characteristic_type_description (text) | Ref_Colors : color_code (text) , color_description (text) | Ref_Product_Categories : product_category_code (text) , product_category_description (text) , unit_of_measure (text) | Characteristics : characteristic_id (text) , characteristic_type_code (text) , characteristic_data_type (text) , characteristic_name (text) , other_characteristic_details (text) | Products : product_id (text) , color_code (text) , product_category_code (text) , product_name (text) , typical_buying_price (text) , typical_selling_price (text) , product_description (text) , other_product_details (text) | Product_Characteristics : product_id (text) , characteristic_id (text) , product_characteristic_value (text);</schema>"
<primary_keys>[Primary Keys]: ref_characteristic_types : characteristic_type_code, ref_colors : color_code, ref_product_categories : product_category_code, characteristics : characteristic_id, products : product_id</primary_keys>"
<foreign_keys>[Foreign Keys]: characteristics : characteristic_type_code = ref_characteristic_types : characteristic_type_code | products : color_code = ref_colors : color_code | products : product_category_code = ref_product_categories : product_category_code | product_characteristics : product_id = products : product_id | product_characteristics : characteristic_id = characteristics : characteristic_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>Count the products that have the color description "white" or have the characteristic name "hot".</question>
[SQL]:
| <SQL_QUERY>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"</SQL_QUERY> | 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" | Count the products that have the color description "white" or have the characteristic name "hot". | [Schema (values) (types)]: | products_gen_characteristics | Ref_Characteristic_Types : characteristic_type_code (text) , characteristic_type_description (text) | Ref_Colors : color_code (text) , color_description (text) | Ref_Product_Categories : product_category_code (text) , product_category_description (text) , unit_of_measure (text) | Characteristics : characteristic_id (text) , characteristic_type_code (text) , characteristic_data_type (text) , characteristic_name (text) , other_characteristic_details (text) | Products : product_id (text) , color_code (text) , product_category_code (text) , product_name (text) , typical_buying_price (text) , typical_selling_price (text) , product_description (text) , other_product_details (text) | Product_Characteristics : product_id (text) , characteristic_id (text) , product_characteristic_value (text); | [Primary Keys]: ref_characteristic_types : characteristic_type_code, ref_colors : color_code, ref_product_categories : product_category_code, characteristics : characteristic_id, products : product_id | [Foreign Keys]: characteristics : characteristic_type_code = ref_characteristic_types : characteristic_type_code | products : color_code = ref_colors : color_code | products : product_category_code = ref_product_categories : product_category_code | product_characteristics : product_id = products : product_id | product_characteristics : characteristic_id = characteristics : characteristic_id |
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | products_gen_characteristics | Ref_Characteristic_Types : characteristic_type_code (text) , characteristic_type_description (text) | Ref_Colors : color_code (text) , color_description (text) | Ref_Product_Categories : product_category_code (text) , product_category_description (text) , unit_of_measure (text) | Characteristics : characteristic_id (text) , characteristic_type_code (text) , characteristic_data_type (text) , characteristic_name (text) , other_characteristic_details (text) | Products : product_id (text) , color_code (text) , product_category_code (text) , product_name (text) , typical_buying_price (text) , typical_selling_price (text) , product_description (text) , other_product_details (text) | Product_Characteristics : product_id (text) , characteristic_id (text) , product_characteristic_value (text);</schema>"
<primary_keys>[Primary Keys]: ref_characteristic_types : characteristic_type_code, ref_colors : color_code, ref_product_categories : product_category_code, characteristics : characteristic_id, products : product_id</primary_keys>"
<foreign_keys>[Foreign Keys]: characteristics : characteristic_type_code = ref_characteristic_types : characteristic_type_code | products : color_code = ref_colors : color_code | products : product_category_code = ref_product_categories : product_category_code | product_characteristics : product_id = products : product_id | product_characteristics : characteristic_id = characteristics : characteristic_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>How many products have their color described as 'white' or have a characteristic with the name 'hot'?</question>
[SQL]:
| <SQL_QUERY>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"</SQL_QUERY> | 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" | How many products have their color described as 'white' or have a characteristic with the name 'hot'? | [Schema (values) (types)]: | products_gen_characteristics | Ref_Characteristic_Types : characteristic_type_code (text) , characteristic_type_description (text) | Ref_Colors : color_code (text) , color_description (text) | Ref_Product_Categories : product_category_code (text) , product_category_description (text) , unit_of_measure (text) | Characteristics : characteristic_id (text) , characteristic_type_code (text) , characteristic_data_type (text) , characteristic_name (text) , other_characteristic_details (text) | Products : product_id (text) , color_code (text) , product_category_code (text) , product_name (text) , typical_buying_price (text) , typical_selling_price (text) , product_description (text) , other_product_details (text) | Product_Characteristics : product_id (text) , characteristic_id (text) , product_characteristic_value (text); | [Primary Keys]: ref_characteristic_types : characteristic_type_code, ref_colors : color_code, ref_product_categories : product_category_code, characteristics : characteristic_id, products : product_id | [Foreign Keys]: characteristics : characteristic_type_code = ref_characteristic_types : characteristic_type_code | products : color_code = ref_colors : color_code | products : product_category_code = ref_product_categories : product_category_code | product_characteristics : product_id = products : product_id | product_characteristics : characteristic_id = characteristics : characteristic_id |
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | products_gen_characteristics | Ref_Characteristic_Types : characteristic_type_code (text) , characteristic_type_description (text) | Ref_Colors : color_code (text) , color_description (text) | Ref_Product_Categories : product_category_code (text) , product_category_description (text) , unit_of_measure (text) | Characteristics : characteristic_id (text) , characteristic_type_code (text) , characteristic_data_type (text) , characteristic_name (text) , other_characteristic_details (text) | Products : product_id (text) , color_code (text) , product_category_code (text) , product_name (text) , typical_buying_price (text) , typical_selling_price (text) , product_description (text) , other_product_details (text) | Product_Characteristics : product_id (text) , characteristic_id (text) , product_characteristic_value (text);</schema>"
<primary_keys>[Primary Keys]: ref_characteristic_types : characteristic_type_code, ref_colors : color_code, ref_product_categories : product_category_code, characteristics : characteristic_id, products : product_id</primary_keys>"
<foreign_keys>[Foreign Keys]: characteristics : characteristic_type_code = ref_characteristic_types : characteristic_type_code | products : color_code = ref_colors : color_code | products : product_category_code = ref_product_categories : product_category_code | product_characteristics : product_id = products : product_id | product_characteristics : characteristic_id = characteristics : characteristic_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>What is the unit of measuerment of the product category code "Herbs"?</question>
[SQL]:
| <SQL_QUERY>SELECT unit_of_measure FROM ref_product_categories WHERE product_category_code = "Herbs"</SQL_QUERY> | products_gen_characteristics | SELECT unit_of_measure FROM ref_product_categories WHERE product_category_code = "Herbs" | What is the unit of measuerment of the product category code "Herbs"? | [Schema (values) (types)]: | products_gen_characteristics | Ref_Characteristic_Types : characteristic_type_code (text) , characteristic_type_description (text) | Ref_Colors : color_code (text) , color_description (text) | Ref_Product_Categories : product_category_code (text) , product_category_description (text) , unit_of_measure (text) | Characteristics : characteristic_id (text) , characteristic_type_code (text) , characteristic_data_type (text) , characteristic_name (text) , other_characteristic_details (text) | Products : product_id (text) , color_code (text) , product_category_code (text) , product_name (text) , typical_buying_price (text) , typical_selling_price (text) , product_description (text) , other_product_details (text) | Product_Characteristics : product_id (text) , characteristic_id (text) , product_characteristic_value (text); | [Primary Keys]: ref_characteristic_types : characteristic_type_code, ref_colors : color_code, ref_product_categories : product_category_code, characteristics : characteristic_id, products : product_id | [Foreign Keys]: characteristics : characteristic_type_code = ref_characteristic_types : characteristic_type_code | products : color_code = ref_colors : color_code | products : product_category_code = ref_product_categories : product_category_code | product_characteristics : product_id = products : product_id | product_characteristics : characteristic_id = characteristics : characteristic_id |
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | products_gen_characteristics | Ref_Characteristic_Types : characteristic_type_code (text) , characteristic_type_description (text) | Ref_Colors : color_code (text) , color_description (text) | Ref_Product_Categories : product_category_code (text) , product_category_description (text) , unit_of_measure (text) | Characteristics : characteristic_id (text) , characteristic_type_code (text) , characteristic_data_type (text) , characteristic_name (text) , other_characteristic_details (text) | Products : product_id (text) , color_code (text) , product_category_code (text) , product_name (text) , typical_buying_price (text) , typical_selling_price (text) , product_description (text) , other_product_details (text) | Product_Characteristics : product_id (text) , characteristic_id (text) , product_characteristic_value (text);</schema>"
<primary_keys>[Primary Keys]: ref_characteristic_types : characteristic_type_code, ref_colors : color_code, ref_product_categories : product_category_code, characteristics : characteristic_id, products : product_id</primary_keys>"
<foreign_keys>[Foreign Keys]: characteristics : characteristic_type_code = ref_characteristic_types : characteristic_type_code | products : color_code = ref_colors : color_code | products : product_category_code = ref_product_categories : product_category_code | product_characteristics : product_id = products : product_id | product_characteristics : characteristic_id = characteristics : characteristic_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>Return the unit of measure for 'Herb' products.</question>
[SQL]:
| <SQL_QUERY>SELECT unit_of_measure FROM ref_product_categories WHERE product_category_code = "Herbs"</SQL_QUERY> | products_gen_characteristics | SELECT unit_of_measure FROM ref_product_categories WHERE product_category_code = "Herbs" | Return the unit of measure for 'Herb' products. | [Schema (values) (types)]: | products_gen_characteristics | Ref_Characteristic_Types : characteristic_type_code (text) , characteristic_type_description (text) | Ref_Colors : color_code (text) , color_description (text) | Ref_Product_Categories : product_category_code (text) , product_category_description (text) , unit_of_measure (text) | Characteristics : characteristic_id (text) , characteristic_type_code (text) , characteristic_data_type (text) , characteristic_name (text) , other_characteristic_details (text) | Products : product_id (text) , color_code (text) , product_category_code (text) , product_name (text) , typical_buying_price (text) , typical_selling_price (text) , product_description (text) , other_product_details (text) | Product_Characteristics : product_id (text) , characteristic_id (text) , product_characteristic_value (text); | [Primary Keys]: ref_characteristic_types : characteristic_type_code, ref_colors : color_code, ref_product_categories : product_category_code, characteristics : characteristic_id, products : product_id | [Foreign Keys]: characteristics : characteristic_type_code = ref_characteristic_types : characteristic_type_code | products : color_code = ref_colors : color_code | products : product_category_code = ref_product_categories : product_category_code | product_characteristics : product_id = products : product_id | product_characteristics : characteristic_id = characteristics : characteristic_id |
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | products_gen_characteristics | Ref_Characteristic_Types : characteristic_type_code (text) , characteristic_type_description (text) | Ref_Colors : color_code (text) , color_description (text) | Ref_Product_Categories : product_category_code (text) , product_category_description (text) , unit_of_measure (text) | Characteristics : characteristic_id (text) , characteristic_type_code (text) , characteristic_data_type (text) , characteristic_name (text) , other_characteristic_details (text) | Products : product_id (text) , color_code (text) , product_category_code (text) , product_name (text) , typical_buying_price (text) , typical_selling_price (text) , product_description (text) , other_product_details (text) | Product_Characteristics : product_id (text) , characteristic_id (text) , product_characteristic_value (text);</schema>"
<primary_keys>[Primary Keys]: ref_characteristic_types : characteristic_type_code, ref_colors : color_code, ref_product_categories : product_category_code, characteristics : characteristic_id, products : product_id</primary_keys>"
<foreign_keys>[Foreign Keys]: characteristics : characteristic_type_code = ref_characteristic_types : characteristic_type_code | products : color_code = ref_colors : color_code | products : product_category_code = ref_product_categories : product_category_code | product_characteristics : product_id = products : product_id | product_characteristics : characteristic_id = characteristics : characteristic_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>Find the product category description of the product category with code "Spices".</question>
[SQL]:
| <SQL_QUERY>SELECT product_category_description FROM ref_product_categories WHERE product_category_code = "Spices"</SQL_QUERY> | products_gen_characteristics | SELECT product_category_description FROM ref_product_categories WHERE product_category_code = "Spices" | Find the product category description of the product category with code "Spices". | [Schema (values) (types)]: | products_gen_characteristics | Ref_Characteristic_Types : characteristic_type_code (text) , characteristic_type_description (text) | Ref_Colors : color_code (text) , color_description (text) | Ref_Product_Categories : product_category_code (text) , product_category_description (text) , unit_of_measure (text) | Characteristics : characteristic_id (text) , characteristic_type_code (text) , characteristic_data_type (text) , characteristic_name (text) , other_characteristic_details (text) | Products : product_id (text) , color_code (text) , product_category_code (text) , product_name (text) , typical_buying_price (text) , typical_selling_price (text) , product_description (text) , other_product_details (text) | Product_Characteristics : product_id (text) , characteristic_id (text) , product_characteristic_value (text); | [Primary Keys]: ref_characteristic_types : characteristic_type_code, ref_colors : color_code, ref_product_categories : product_category_code, characteristics : characteristic_id, products : product_id | [Foreign Keys]: characteristics : characteristic_type_code = ref_characteristic_types : characteristic_type_code | products : color_code = ref_colors : color_code | products : product_category_code = ref_product_categories : product_category_code | product_characteristics : product_id = products : product_id | product_characteristics : characteristic_id = characteristics : characteristic_id |
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | products_gen_characteristics | Ref_Characteristic_Types : characteristic_type_code (text) , characteristic_type_description (text) | Ref_Colors : color_code (text) , color_description (text) | Ref_Product_Categories : product_category_code (text) , product_category_description (text) , unit_of_measure (text) | Characteristics : characteristic_id (text) , characteristic_type_code (text) , characteristic_data_type (text) , characteristic_name (text) , other_characteristic_details (text) | Products : product_id (text) , color_code (text) , product_category_code (text) , product_name (text) , typical_buying_price (text) , typical_selling_price (text) , product_description (text) , other_product_details (text) | Product_Characteristics : product_id (text) , characteristic_id (text) , product_characteristic_value (text);</schema>"
<primary_keys>[Primary Keys]: ref_characteristic_types : characteristic_type_code, ref_colors : color_code, ref_product_categories : product_category_code, characteristics : characteristic_id, products : product_id</primary_keys>"
<foreign_keys>[Foreign Keys]: characteristics : characteristic_type_code = ref_characteristic_types : characteristic_type_code | products : color_code = ref_colors : color_code | products : product_category_code = ref_product_categories : product_category_code | product_characteristics : product_id = products : product_id | product_characteristics : characteristic_id = characteristics : characteristic_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>What is the description of the product category with the code 'Spices'?</question>
[SQL]:
| <SQL_QUERY>SELECT product_category_description FROM ref_product_categories WHERE product_category_code = "Spices"</SQL_QUERY> | products_gen_characteristics | SELECT product_category_description FROM ref_product_categories WHERE product_category_code = "Spices" | What is the description of the product category with the code 'Spices'? | [Schema (values) (types)]: | products_gen_characteristics | Ref_Characteristic_Types : characteristic_type_code (text) , characteristic_type_description (text) | Ref_Colors : color_code (text) , color_description (text) | Ref_Product_Categories : product_category_code (text) , product_category_description (text) , unit_of_measure (text) | Characteristics : characteristic_id (text) , characteristic_type_code (text) , characteristic_data_type (text) , characteristic_name (text) , other_characteristic_details (text) | Products : product_id (text) , color_code (text) , product_category_code (text) , product_name (text) , typical_buying_price (text) , typical_selling_price (text) , product_description (text) , other_product_details (text) | Product_Characteristics : product_id (text) , characteristic_id (text) , product_characteristic_value (text); | [Primary Keys]: ref_characteristic_types : characteristic_type_code, ref_colors : color_code, ref_product_categories : product_category_code, characteristics : characteristic_id, products : product_id | [Foreign Keys]: characteristics : characteristic_type_code = ref_characteristic_types : characteristic_type_code | products : color_code = ref_colors : color_code | products : product_category_code = ref_product_categories : product_category_code | product_characteristics : product_id = products : product_id | product_characteristics : characteristic_id = characteristics : characteristic_id |
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | products_gen_characteristics | Ref_Characteristic_Types : characteristic_type_code (text) , characteristic_type_description (text) | Ref_Colors : color_code (text) , color_description (text) | Ref_Product_Categories : product_category_code (text) , product_category_description (text) , unit_of_measure (text) | Characteristics : characteristic_id (text) , characteristic_type_code (text) , characteristic_data_type (text) , characteristic_name (text) , other_characteristic_details (text) | Products : product_id (text) , color_code (text) , product_category_code (text) , product_name (text) , typical_buying_price (text) , typical_selling_price (text) , product_description (text) , other_product_details (text) | Product_Characteristics : product_id (text) , characteristic_id (text) , product_characteristic_value (text);</schema>"
<primary_keys>[Primary Keys]: ref_characteristic_types : characteristic_type_code, ref_colors : color_code, ref_product_categories : product_category_code, characteristics : characteristic_id, products : product_id</primary_keys>"
<foreign_keys>[Foreign Keys]: characteristics : characteristic_type_code = ref_characteristic_types : characteristic_type_code | products : color_code = ref_colors : color_code | products : product_category_code = ref_product_categories : product_category_code | product_characteristics : product_id = products : product_id | product_characteristics : characteristic_id = characteristics : characteristic_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>What is the product category description and unit of measurement of category "Herbs"?</question>
[SQL]:
| <SQL_QUERY>SELECT product_category_description , unit_of_measure FROM ref_product_categories WHERE product_category_code = "Herbs"</SQL_QUERY> | products_gen_characteristics | SELECT product_category_description , unit_of_measure FROM ref_product_categories WHERE product_category_code = "Herbs" | What is the product category description and unit of measurement of category "Herbs"? | [Schema (values) (types)]: | products_gen_characteristics | Ref_Characteristic_Types : characteristic_type_code (text) , characteristic_type_description (text) | Ref_Colors : color_code (text) , color_description (text) | Ref_Product_Categories : product_category_code (text) , product_category_description (text) , unit_of_measure (text) | Characteristics : characteristic_id (text) , characteristic_type_code (text) , characteristic_data_type (text) , characteristic_name (text) , other_characteristic_details (text) | Products : product_id (text) , color_code (text) , product_category_code (text) , product_name (text) , typical_buying_price (text) , typical_selling_price (text) , product_description (text) , other_product_details (text) | Product_Characteristics : product_id (text) , characteristic_id (text) , product_characteristic_value (text); | [Primary Keys]: ref_characteristic_types : characteristic_type_code, ref_colors : color_code, ref_product_categories : product_category_code, characteristics : characteristic_id, products : product_id | [Foreign Keys]: characteristics : characteristic_type_code = ref_characteristic_types : characteristic_type_code | products : color_code = ref_colors : color_code | products : product_category_code = ref_product_categories : product_category_code | product_characteristics : product_id = products : product_id | product_characteristics : characteristic_id = characteristics : characteristic_id |
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | products_gen_characteristics | Ref_Characteristic_Types : characteristic_type_code (text) , characteristic_type_description (text) | Ref_Colors : color_code (text) , color_description (text) | Ref_Product_Categories : product_category_code (text) , product_category_description (text) , unit_of_measure (text) | Characteristics : characteristic_id (text) , characteristic_type_code (text) , characteristic_data_type (text) , characteristic_name (text) , other_characteristic_details (text) | Products : product_id (text) , color_code (text) , product_category_code (text) , product_name (text) , typical_buying_price (text) , typical_selling_price (text) , product_description (text) , other_product_details (text) | Product_Characteristics : product_id (text) , characteristic_id (text) , product_characteristic_value (text);</schema>"
<primary_keys>[Primary Keys]: ref_characteristic_types : characteristic_type_code, ref_colors : color_code, ref_product_categories : product_category_code, characteristics : characteristic_id, products : product_id</primary_keys>"
<foreign_keys>[Foreign Keys]: characteristics : characteristic_type_code = ref_characteristic_types : characteristic_type_code | products : color_code = ref_colors : color_code | products : product_category_code = ref_product_categories : product_category_code | product_characteristics : product_id = products : product_id | product_characteristics : characteristic_id = characteristics : characteristic_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>Return the description and unit of measurement for products in the 'Herbs' category.</question>
[SQL]:
| <SQL_QUERY>SELECT product_category_description , unit_of_measure FROM ref_product_categories WHERE product_category_code = "Herbs"</SQL_QUERY> | products_gen_characteristics | SELECT product_category_description , unit_of_measure FROM ref_product_categories WHERE product_category_code = "Herbs" | Return the description and unit of measurement for products in the 'Herbs' category. | [Schema (values) (types)]: | products_gen_characteristics | Ref_Characteristic_Types : characteristic_type_code (text) , characteristic_type_description (text) | Ref_Colors : color_code (text) , color_description (text) | Ref_Product_Categories : product_category_code (text) , product_category_description (text) , unit_of_measure (text) | Characteristics : characteristic_id (text) , characteristic_type_code (text) , characteristic_data_type (text) , characteristic_name (text) , other_characteristic_details (text) | Products : product_id (text) , color_code (text) , product_category_code (text) , product_name (text) , typical_buying_price (text) , typical_selling_price (text) , product_description (text) , other_product_details (text) | Product_Characteristics : product_id (text) , characteristic_id (text) , product_characteristic_value (text); | [Primary Keys]: ref_characteristic_types : characteristic_type_code, ref_colors : color_code, ref_product_categories : product_category_code, characteristics : characteristic_id, products : product_id | [Foreign Keys]: characteristics : characteristic_type_code = ref_characteristic_types : characteristic_type_code | products : color_code = ref_colors : color_code | products : product_category_code = ref_product_categories : product_category_code | product_characteristics : product_id = products : product_id | product_characteristics : characteristic_id = characteristics : characteristic_id |
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | products_gen_characteristics | Ref_Characteristic_Types : characteristic_type_code (text) , characteristic_type_description (text) | Ref_Colors : color_code (text) , color_description (text) | Ref_Product_Categories : product_category_code (text) , product_category_description (text) , unit_of_measure (text) | Characteristics : characteristic_id (text) , characteristic_type_code (text) , characteristic_data_type (text) , characteristic_name (text) , other_characteristic_details (text) | Products : product_id (text) , color_code (text) , product_category_code (text) , product_name (text) , typical_buying_price (text) , typical_selling_price (text) , product_description (text) , other_product_details (text) | Product_Characteristics : product_id (text) , characteristic_id (text) , product_characteristic_value (text);</schema>"
<primary_keys>[Primary Keys]: ref_characteristic_types : characteristic_type_code, ref_colors : color_code, ref_product_categories : product_category_code, characteristics : characteristic_id, products : product_id</primary_keys>"
<foreign_keys>[Foreign Keys]: characteristics : characteristic_type_code = ref_characteristic_types : characteristic_type_code | products : color_code = ref_colors : color_code | products : product_category_code = ref_product_categories : product_category_code | product_characteristics : product_id = products : product_id | product_characteristics : characteristic_id = characteristics : characteristic_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>What is the unit of measurement of product named "cumin"?</question>
[SQL]:
| <SQL_QUERY>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"</SQL_QUERY> | 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" | What is the unit of measurement of product named "cumin"? | [Schema (values) (types)]: | products_gen_characteristics | Ref_Characteristic_Types : characteristic_type_code (text) , characteristic_type_description (text) | Ref_Colors : color_code (text) , color_description (text) | Ref_Product_Categories : product_category_code (text) , product_category_description (text) , unit_of_measure (text) | Characteristics : characteristic_id (text) , characteristic_type_code (text) , characteristic_data_type (text) , characteristic_name (text) , other_characteristic_details (text) | Products : product_id (text) , color_code (text) , product_category_code (text) , product_name (text) , typical_buying_price (text) , typical_selling_price (text) , product_description (text) , other_product_details (text) | Product_Characteristics : product_id (text) , characteristic_id (text) , product_characteristic_value (text); | [Primary Keys]: ref_characteristic_types : characteristic_type_code, ref_colors : color_code, ref_product_categories : product_category_code, characteristics : characteristic_id, products : product_id | [Foreign Keys]: characteristics : characteristic_type_code = ref_characteristic_types : characteristic_type_code | products : color_code = ref_colors : color_code | products : product_category_code = ref_product_categories : product_category_code | product_characteristics : product_id = products : product_id | product_characteristics : characteristic_id = characteristics : characteristic_id |
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | products_gen_characteristics | Ref_Characteristic_Types : characteristic_type_code (text) , characteristic_type_description (text) | Ref_Colors : color_code (text) , color_description (text) | Ref_Product_Categories : product_category_code (text) , product_category_description (text) , unit_of_measure (text) | Characteristics : characteristic_id (text) , characteristic_type_code (text) , characteristic_data_type (text) , characteristic_name (text) , other_characteristic_details (text) | Products : product_id (text) , color_code (text) , product_category_code (text) , product_name (text) , typical_buying_price (text) , typical_selling_price (text) , product_description (text) , other_product_details (text) | Product_Characteristics : product_id (text) , characteristic_id (text) , product_characteristic_value (text);</schema>"
<primary_keys>[Primary Keys]: ref_characteristic_types : characteristic_type_code, ref_colors : color_code, ref_product_categories : product_category_code, characteristics : characteristic_id, products : product_id</primary_keys>"
<foreign_keys>[Foreign Keys]: characteristics : characteristic_type_code = ref_characteristic_types : characteristic_type_code | products : color_code = ref_colors : color_code | products : product_category_code = ref_product_categories : product_category_code | product_characteristics : product_id = products : product_id | product_characteristics : characteristic_id = characteristics : characteristic_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>Give the unit of measure for the product with the name 'cumin'.</question>
[SQL]:
| <SQL_QUERY>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"</SQL_QUERY> | 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" | Give the unit of measure for the product with the name 'cumin'. | [Schema (values) (types)]: | products_gen_characteristics | Ref_Characteristic_Types : characteristic_type_code (text) , characteristic_type_description (text) | Ref_Colors : color_code (text) , color_description (text) | Ref_Product_Categories : product_category_code (text) , product_category_description (text) , unit_of_measure (text) | Characteristics : characteristic_id (text) , characteristic_type_code (text) , characteristic_data_type (text) , characteristic_name (text) , other_characteristic_details (text) | Products : product_id (text) , color_code (text) , product_category_code (text) , product_name (text) , typical_buying_price (text) , typical_selling_price (text) , product_description (text) , other_product_details (text) | Product_Characteristics : product_id (text) , characteristic_id (text) , product_characteristic_value (text); | [Primary Keys]: ref_characteristic_types : characteristic_type_code, ref_colors : color_code, ref_product_categories : product_category_code, characteristics : characteristic_id, products : product_id | [Foreign Keys]: characteristics : characteristic_type_code = ref_characteristic_types : characteristic_type_code | products : color_code = ref_colors : color_code | products : product_category_code = ref_product_categories : product_category_code | product_characteristics : product_id = products : product_id | product_characteristics : characteristic_id = characteristics : characteristic_id |
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | products_gen_characteristics | Ref_Characteristic_Types : characteristic_type_code (text) , characteristic_type_description (text) | Ref_Colors : color_code (text) , color_description (text) | Ref_Product_Categories : product_category_code (text) , product_category_description (text) , unit_of_measure (text) | Characteristics : characteristic_id (text) , characteristic_type_code (text) , characteristic_data_type (text) , characteristic_name (text) , other_characteristic_details (text) | Products : product_id (text) , color_code (text) , product_category_code (text) , product_name (text) , typical_buying_price (text) , typical_selling_price (text) , product_description (text) , other_product_details (text) | Product_Characteristics : product_id (text) , characteristic_id (text) , product_characteristic_value (text);</schema>"
<primary_keys>[Primary Keys]: ref_characteristic_types : characteristic_type_code, ref_colors : color_code, ref_product_categories : product_category_code, characteristics : characteristic_id, products : product_id</primary_keys>"
<foreign_keys>[Foreign Keys]: characteristics : characteristic_type_code = ref_characteristic_types : characteristic_type_code | products : color_code = ref_colors : color_code | products : product_category_code = ref_product_categories : product_category_code | product_characteristics : product_id = products : product_id | product_characteristics : characteristic_id = characteristics : characteristic_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>Find the unit of measurement and product category code of product named "chervil".</question>
[SQL]:
| <SQL_QUERY>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"</SQL_QUERY> | 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" | Find the unit of measurement and product category code of product named "chervil". | [Schema (values) (types)]: | products_gen_characteristics | Ref_Characteristic_Types : characteristic_type_code (text) , characteristic_type_description (text) | Ref_Colors : color_code (text) , color_description (text) | Ref_Product_Categories : product_category_code (text) , product_category_description (text) , unit_of_measure (text) | Characteristics : characteristic_id (text) , characteristic_type_code (text) , characteristic_data_type (text) , characteristic_name (text) , other_characteristic_details (text) | Products : product_id (text) , color_code (text) , product_category_code (text) , product_name (text) , typical_buying_price (text) , typical_selling_price (text) , product_description (text) , other_product_details (text) | Product_Characteristics : product_id (text) , characteristic_id (text) , product_characteristic_value (text); | [Primary Keys]: ref_characteristic_types : characteristic_type_code, ref_colors : color_code, ref_product_categories : product_category_code, characteristics : characteristic_id, products : product_id | [Foreign Keys]: characteristics : characteristic_type_code = ref_characteristic_types : characteristic_type_code | products : color_code = ref_colors : color_code | products : product_category_code = ref_product_categories : product_category_code | product_characteristics : product_id = products : product_id | product_characteristics : characteristic_id = characteristics : characteristic_id |
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | products_gen_characteristics | Ref_Characteristic_Types : characteristic_type_code (text) , characteristic_type_description (text) | Ref_Colors : color_code (text) , color_description (text) | Ref_Product_Categories : product_category_code (text) , product_category_description (text) , unit_of_measure (text) | Characteristics : characteristic_id (text) , characteristic_type_code (text) , characteristic_data_type (text) , characteristic_name (text) , other_characteristic_details (text) | Products : product_id (text) , color_code (text) , product_category_code (text) , product_name (text) , typical_buying_price (text) , typical_selling_price (text) , product_description (text) , other_product_details (text) | Product_Characteristics : product_id (text) , characteristic_id (text) , product_characteristic_value (text);</schema>"
<primary_keys>[Primary Keys]: ref_characteristic_types : characteristic_type_code, ref_colors : color_code, ref_product_categories : product_category_code, characteristics : characteristic_id, products : product_id</primary_keys>"
<foreign_keys>[Foreign Keys]: characteristics : characteristic_type_code = ref_characteristic_types : characteristic_type_code | products : color_code = ref_colors : color_code | products : product_category_code = ref_product_categories : product_category_code | product_characteristics : product_id = products : product_id | product_characteristics : characteristic_id = characteristics : characteristic_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>What are the unit of measure and category code for the 'chervil' product?</question>
[SQL]:
| <SQL_QUERY>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"</SQL_QUERY> | 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" | What are the unit of measure and category code for the 'chervil' product? | [Schema (values) (types)]: | products_gen_characteristics | Ref_Characteristic_Types : characteristic_type_code (text) , characteristic_type_description (text) | Ref_Colors : color_code (text) , color_description (text) | Ref_Product_Categories : product_category_code (text) , product_category_description (text) , unit_of_measure (text) | Characteristics : characteristic_id (text) , characteristic_type_code (text) , characteristic_data_type (text) , characteristic_name (text) , other_characteristic_details (text) | Products : product_id (text) , color_code (text) , product_category_code (text) , product_name (text) , typical_buying_price (text) , typical_selling_price (text) , product_description (text) , other_product_details (text) | Product_Characteristics : product_id (text) , characteristic_id (text) , product_characteristic_value (text); | [Primary Keys]: ref_characteristic_types : characteristic_type_code, ref_colors : color_code, ref_product_categories : product_category_code, characteristics : characteristic_id, products : product_id | [Foreign Keys]: characteristics : characteristic_type_code = ref_characteristic_types : characteristic_type_code | products : color_code = ref_colors : color_code | products : product_category_code = ref_product_categories : product_category_code | product_characteristics : product_id = products : product_id | product_characteristics : characteristic_id = characteristics : characteristic_id |
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | products_gen_characteristics | Ref_Characteristic_Types : characteristic_type_code (text) , characteristic_type_description (text) | Ref_Colors : color_code (text) , color_description (text) | Ref_Product_Categories : product_category_code (text) , product_category_description (text) , unit_of_measure (text) | Characteristics : characteristic_id (text) , characteristic_type_code (text) , characteristic_data_type (text) , characteristic_name (text) , other_characteristic_details (text) | Products : product_id (text) , color_code (text) , product_category_code (text) , product_name (text) , typical_buying_price (text) , typical_selling_price (text) , product_description (text) , other_product_details (text) | Product_Characteristics : product_id (text) , characteristic_id (text) , product_characteristic_value (text);</schema>"
<primary_keys>[Primary Keys]: ref_characteristic_types : characteristic_type_code, ref_colors : color_code, ref_product_categories : product_category_code, characteristics : characteristic_id, products : product_id</primary_keys>"
<foreign_keys>[Foreign Keys]: characteristics : characteristic_type_code = ref_characteristic_types : characteristic_type_code | products : color_code = ref_colors : color_code | products : product_category_code = ref_product_categories : product_category_code | product_characteristics : product_id = products : product_id | product_characteristics : characteristic_id = characteristics : characteristic_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>Find the product names that are colored 'white' but do not have unit of measurement "Handful".</question>
[SQL]:
| <SQL_QUERY>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"</SQL_QUERY> | 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" | Find the product names that are colored 'white' but do not have unit of measurement "Handful". | [Schema (values) (types)]: | products_gen_characteristics | Ref_Characteristic_Types : characteristic_type_code (text) , characteristic_type_description (text) | Ref_Colors : color_code (text) , color_description (text) | Ref_Product_Categories : product_category_code (text) , product_category_description (text) , unit_of_measure (text) | Characteristics : characteristic_id (text) , characteristic_type_code (text) , characteristic_data_type (text) , characteristic_name (text) , other_characteristic_details (text) | Products : product_id (text) , color_code (text) , product_category_code (text) , product_name (text) , typical_buying_price (text) , typical_selling_price (text) , product_description (text) , other_product_details (text) | Product_Characteristics : product_id (text) , characteristic_id (text) , product_characteristic_value (text); | [Primary Keys]: ref_characteristic_types : characteristic_type_code, ref_colors : color_code, ref_product_categories : product_category_code, characteristics : characteristic_id, products : product_id | [Foreign Keys]: characteristics : characteristic_type_code = ref_characteristic_types : characteristic_type_code | products : color_code = ref_colors : color_code | products : product_category_code = ref_product_categories : product_category_code | product_characteristics : product_id = products : product_id | product_characteristics : characteristic_id = characteristics : characteristic_id |
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | products_gen_characteristics | Ref_Characteristic_Types : characteristic_type_code (text) , characteristic_type_description (text) | Ref_Colors : color_code (text) , color_description (text) | Ref_Product_Categories : product_category_code (text) , product_category_description (text) , unit_of_measure (text) | Characteristics : characteristic_id (text) , characteristic_type_code (text) , characteristic_data_type (text) , characteristic_name (text) , other_characteristic_details (text) | Products : product_id (text) , color_code (text) , product_category_code (text) , product_name (text) , typical_buying_price (text) , typical_selling_price (text) , product_description (text) , other_product_details (text) | Product_Characteristics : product_id (text) , characteristic_id (text) , product_characteristic_value (text);</schema>"
<primary_keys>[Primary Keys]: ref_characteristic_types : characteristic_type_code, ref_colors : color_code, ref_product_categories : product_category_code, characteristics : characteristic_id, products : product_id</primary_keys>"
<foreign_keys>[Foreign Keys]: characteristics : characteristic_type_code = ref_characteristic_types : characteristic_type_code | products : color_code = ref_colors : color_code | products : product_category_code = ref_product_categories : product_category_code | product_characteristics : product_id = products : product_id | product_characteristics : characteristic_id = characteristics : characteristic_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>What are the names of products that are not 'white' in color and are not measured by the unit 'Handful'?</question>
[SQL]:
| <SQL_QUERY>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"</SQL_QUERY> | 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" | What are the names of products that are not 'white' in color and are not measured by the unit 'Handful'? | [Schema (values) (types)]: | products_gen_characteristics | Ref_Characteristic_Types : characteristic_type_code (text) , characteristic_type_description (text) | Ref_Colors : color_code (text) , color_description (text) | Ref_Product_Categories : product_category_code (text) , product_category_description (text) , unit_of_measure (text) | Characteristics : characteristic_id (text) , characteristic_type_code (text) , characteristic_data_type (text) , characteristic_name (text) , other_characteristic_details (text) | Products : product_id (text) , color_code (text) , product_category_code (text) , product_name (text) , typical_buying_price (text) , typical_selling_price (text) , product_description (text) , other_product_details (text) | Product_Characteristics : product_id (text) , characteristic_id (text) , product_characteristic_value (text); | [Primary Keys]: ref_characteristic_types : characteristic_type_code, ref_colors : color_code, ref_product_categories : product_category_code, characteristics : characteristic_id, products : product_id | [Foreign Keys]: characteristics : characteristic_type_code = ref_characteristic_types : characteristic_type_code | products : color_code = ref_colors : color_code | products : product_category_code = ref_product_categories : product_category_code | product_characteristics : product_id = products : product_id | product_characteristics : characteristic_id = characteristics : characteristic_id |
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | products_gen_characteristics | Ref_Characteristic_Types : characteristic_type_code (text) , characteristic_type_description (text) | Ref_Colors : color_code (text) , color_description (text) | Ref_Product_Categories : product_category_code (text) , product_category_description (text) , unit_of_measure (text) | Characteristics : characteristic_id (text) , characteristic_type_code (text) , characteristic_data_type (text) , characteristic_name (text) , other_characteristic_details (text) | Products : product_id (text) , color_code (text) , product_category_code (text) , product_name (text) , typical_buying_price (text) , typical_selling_price (text) , product_description (text) , other_product_details (text) | Product_Characteristics : product_id (text) , characteristic_id (text) , product_characteristic_value (text);</schema>"
<primary_keys>[Primary Keys]: ref_characteristic_types : characteristic_type_code, ref_colors : color_code, ref_product_categories : product_category_code, characteristics : characteristic_id, products : product_id</primary_keys>"
<foreign_keys>[Foreign Keys]: characteristics : characteristic_type_code = ref_characteristic_types : characteristic_type_code | products : color_code = ref_colors : color_code | products : product_category_code = ref_product_categories : product_category_code | product_characteristics : product_id = products : product_id | product_characteristics : characteristic_id = characteristics : characteristic_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>What is the description of the color for most products?</question>
[SQL]:
| <SQL_QUERY>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</SQL_QUERY> | 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 | What is the description of the color for most products? | [Schema (values) (types)]: | products_gen_characteristics | Ref_Characteristic_Types : characteristic_type_code (text) , characteristic_type_description (text) | Ref_Colors : color_code (text) , color_description (text) | Ref_Product_Categories : product_category_code (text) , product_category_description (text) , unit_of_measure (text) | Characteristics : characteristic_id (text) , characteristic_type_code (text) , characteristic_data_type (text) , characteristic_name (text) , other_characteristic_details (text) | Products : product_id (text) , color_code (text) , product_category_code (text) , product_name (text) , typical_buying_price (text) , typical_selling_price (text) , product_description (text) , other_product_details (text) | Product_Characteristics : product_id (text) , characteristic_id (text) , product_characteristic_value (text); | [Primary Keys]: ref_characteristic_types : characteristic_type_code, ref_colors : color_code, ref_product_categories : product_category_code, characteristics : characteristic_id, products : product_id | [Foreign Keys]: characteristics : characteristic_type_code = ref_characteristic_types : characteristic_type_code | products : color_code = ref_colors : color_code | products : product_category_code = ref_product_categories : product_category_code | product_characteristics : product_id = products : product_id | product_characteristics : characteristic_id = characteristics : characteristic_id |
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | products_gen_characteristics | Ref_Characteristic_Types : characteristic_type_code (text) , characteristic_type_description (text) | Ref_Colors : color_code (text) , color_description (text) | Ref_Product_Categories : product_category_code (text) , product_category_description (text) , unit_of_measure (text) | Characteristics : characteristic_id (text) , characteristic_type_code (text) , characteristic_data_type (text) , characteristic_name (text) , other_characteristic_details (text) | Products : product_id (text) , color_code (text) , product_category_code (text) , product_name (text) , typical_buying_price (text) , typical_selling_price (text) , product_description (text) , other_product_details (text) | Product_Characteristics : product_id (text) , characteristic_id (text) , product_characteristic_value (text);</schema>"
<primary_keys>[Primary Keys]: ref_characteristic_types : characteristic_type_code, ref_colors : color_code, ref_product_categories : product_category_code, characteristics : characteristic_id, products : product_id</primary_keys>"
<foreign_keys>[Foreign Keys]: characteristics : characteristic_type_code = ref_characteristic_types : characteristic_type_code | products : color_code = ref_colors : color_code | products : product_category_code = ref_product_categories : product_category_code | product_characteristics : product_id = products : product_id | product_characteristics : characteristic_id = characteristics : characteristic_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>Return the color description that is most common across all products.</question>
[SQL]:
| <SQL_QUERY>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</SQL_QUERY> | 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 | Return the color description that is most common across all products. | [Schema (values) (types)]: | products_gen_characteristics | Ref_Characteristic_Types : characteristic_type_code (text) , characteristic_type_description (text) | Ref_Colors : color_code (text) , color_description (text) | Ref_Product_Categories : product_category_code (text) , product_category_description (text) , unit_of_measure (text) | Characteristics : characteristic_id (text) , characteristic_type_code (text) , characteristic_data_type (text) , characteristic_name (text) , other_characteristic_details (text) | Products : product_id (text) , color_code (text) , product_category_code (text) , product_name (text) , typical_buying_price (text) , typical_selling_price (text) , product_description (text) , other_product_details (text) | Product_Characteristics : product_id (text) , characteristic_id (text) , product_characteristic_value (text); | [Primary Keys]: ref_characteristic_types : characteristic_type_code, ref_colors : color_code, ref_product_categories : product_category_code, characteristics : characteristic_id, products : product_id | [Foreign Keys]: characteristics : characteristic_type_code = ref_characteristic_types : characteristic_type_code | products : color_code = ref_colors : color_code | products : product_category_code = ref_product_categories : product_category_code | product_characteristics : product_id = products : product_id | product_characteristics : characteristic_id = characteristics : characteristic_id |
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | products_gen_characteristics | Ref_Characteristic_Types : characteristic_type_code (text) , characteristic_type_description (text) | Ref_Colors : color_code (text) , color_description (text) | Ref_Product_Categories : product_category_code (text) , product_category_description (text) , unit_of_measure (text) | Characteristics : characteristic_id (text) , characteristic_type_code (text) , characteristic_data_type (text) , characteristic_name (text) , other_characteristic_details (text) | Products : product_id (text) , color_code (text) , product_category_code (text) , product_name (text) , typical_buying_price (text) , typical_selling_price (text) , product_description (text) , other_product_details (text) | Product_Characteristics : product_id (text) , characteristic_id (text) , product_characteristic_value (text);</schema>"
<primary_keys>[Primary Keys]: ref_characteristic_types : characteristic_type_code, ref_colors : color_code, ref_product_categories : product_category_code, characteristics : characteristic_id, products : product_id</primary_keys>"
<foreign_keys>[Foreign Keys]: characteristics : characteristic_type_code = ref_characteristic_types : characteristic_type_code | products : color_code = ref_colors : color_code | products : product_category_code = ref_product_categories : product_category_code | product_characteristics : product_id = products : product_id | product_characteristics : characteristic_id = characteristics : characteristic_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>What is the description of the color used by least products?</question>
[SQL]:
| <SQL_QUERY>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</SQL_QUERY> | 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 | What is the description of the color used by least products? | [Schema (values) (types)]: | products_gen_characteristics | Ref_Characteristic_Types : characteristic_type_code (text) , characteristic_type_description (text) | Ref_Colors : color_code (text) , color_description (text) | Ref_Product_Categories : product_category_code (text) , product_category_description (text) , unit_of_measure (text) | Characteristics : characteristic_id (text) , characteristic_type_code (text) , characteristic_data_type (text) , characteristic_name (text) , other_characteristic_details (text) | Products : product_id (text) , color_code (text) , product_category_code (text) , product_name (text) , typical_buying_price (text) , typical_selling_price (text) , product_description (text) , other_product_details (text) | Product_Characteristics : product_id (text) , characteristic_id (text) , product_characteristic_value (text); | [Primary Keys]: ref_characteristic_types : characteristic_type_code, ref_colors : color_code, ref_product_categories : product_category_code, characteristics : characteristic_id, products : product_id | [Foreign Keys]: characteristics : characteristic_type_code = ref_characteristic_types : characteristic_type_code | products : color_code = ref_colors : color_code | products : product_category_code = ref_product_categories : product_category_code | product_characteristics : product_id = products : product_id | product_characteristics : characteristic_id = characteristics : characteristic_id |
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | products_gen_characteristics | Ref_Characteristic_Types : characteristic_type_code (text) , characteristic_type_description (text) | Ref_Colors : color_code (text) , color_description (text) | Ref_Product_Categories : product_category_code (text) , product_category_description (text) , unit_of_measure (text) | Characteristics : characteristic_id (text) , characteristic_type_code (text) , characteristic_data_type (text) , characteristic_name (text) , other_characteristic_details (text) | Products : product_id (text) , color_code (text) , product_category_code (text) , product_name (text) , typical_buying_price (text) , typical_selling_price (text) , product_description (text) , other_product_details (text) | Product_Characteristics : product_id (text) , characteristic_id (text) , product_characteristic_value (text);</schema>"
<primary_keys>[Primary Keys]: ref_characteristic_types : characteristic_type_code, ref_colors : color_code, ref_product_categories : product_category_code, characteristics : characteristic_id, products : product_id</primary_keys>"
<foreign_keys>[Foreign Keys]: characteristics : characteristic_type_code = ref_characteristic_types : characteristic_type_code | products : color_code = ref_colors : color_code | products : product_category_code = ref_product_categories : product_category_code | product_characteristics : product_id = products : product_id | product_characteristics : characteristic_id = characteristics : characteristic_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>Give the color description that is least common across products.</question>
[SQL]:
| <SQL_QUERY>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</SQL_QUERY> | 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 | Give the color description that is least common across products. | [Schema (values) (types)]: | products_gen_characteristics | Ref_Characteristic_Types : characteristic_type_code (text) , characteristic_type_description (text) | Ref_Colors : color_code (text) , color_description (text) | Ref_Product_Categories : product_category_code (text) , product_category_description (text) , unit_of_measure (text) | Characteristics : characteristic_id (text) , characteristic_type_code (text) , characteristic_data_type (text) , characteristic_name (text) , other_characteristic_details (text) | Products : product_id (text) , color_code (text) , product_category_code (text) , product_name (text) , typical_buying_price (text) , typical_selling_price (text) , product_description (text) , other_product_details (text) | Product_Characteristics : product_id (text) , characteristic_id (text) , product_characteristic_value (text); | [Primary Keys]: ref_characteristic_types : characteristic_type_code, ref_colors : color_code, ref_product_categories : product_category_code, characteristics : characteristic_id, products : product_id | [Foreign Keys]: characteristics : characteristic_type_code = ref_characteristic_types : characteristic_type_code | products : color_code = ref_colors : color_code | products : product_category_code = ref_product_categories : product_category_code | product_characteristics : product_id = products : product_id | product_characteristics : characteristic_id = characteristics : characteristic_id |
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | products_gen_characteristics | Ref_Characteristic_Types : characteristic_type_code (text) , characteristic_type_description (text) | Ref_Colors : color_code (text) , color_description (text) | Ref_Product_Categories : product_category_code (text) , product_category_description (text) , unit_of_measure (text) | Characteristics : characteristic_id (text) , characteristic_type_code (text) , characteristic_data_type (text) , characteristic_name (text) , other_characteristic_details (text) | Products : product_id (text) , color_code (text) , product_category_code (text) , product_name (text) , typical_buying_price (text) , typical_selling_price (text) , product_description (text) , other_product_details (text) | Product_Characteristics : product_id (text) , characteristic_id (text) , product_characteristic_value (text);</schema>"
<primary_keys>[Primary Keys]: ref_characteristic_types : characteristic_type_code, ref_colors : color_code, ref_product_categories : product_category_code, characteristics : characteristic_id, products : product_id</primary_keys>"
<foreign_keys>[Foreign Keys]: characteristics : characteristic_type_code = ref_characteristic_types : characteristic_type_code | products : color_code = ref_colors : color_code | products : product_category_code = ref_product_categories : product_category_code | product_characteristics : product_id = products : product_id | product_characteristics : characteristic_id = characteristics : characteristic_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>What is the characteristic name used by most number of the products?</question>
[SQL]:
| <SQL_QUERY>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</SQL_QUERY> | 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 | What is the characteristic name used by most number of the products? | [Schema (values) (types)]: | products_gen_characteristics | Ref_Characteristic_Types : characteristic_type_code (text) , characteristic_type_description (text) | Ref_Colors : color_code (text) , color_description (text) | Ref_Product_Categories : product_category_code (text) , product_category_description (text) , unit_of_measure (text) | Characteristics : characteristic_id (text) , characteristic_type_code (text) , characteristic_data_type (text) , characteristic_name (text) , other_characteristic_details (text) | Products : product_id (text) , color_code (text) , product_category_code (text) , product_name (text) , typical_buying_price (text) , typical_selling_price (text) , product_description (text) , other_product_details (text) | Product_Characteristics : product_id (text) , characteristic_id (text) , product_characteristic_value (text); | [Primary Keys]: ref_characteristic_types : characteristic_type_code, ref_colors : color_code, ref_product_categories : product_category_code, characteristics : characteristic_id, products : product_id | [Foreign Keys]: characteristics : characteristic_type_code = ref_characteristic_types : characteristic_type_code | products : color_code = ref_colors : color_code | products : product_category_code = ref_product_categories : product_category_code | product_characteristics : product_id = products : product_id | product_characteristics : characteristic_id = characteristics : characteristic_id |
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | products_gen_characteristics | Ref_Characteristic_Types : characteristic_type_code (text) , characteristic_type_description (text) | Ref_Colors : color_code (text) , color_description (text) | Ref_Product_Categories : product_category_code (text) , product_category_description (text) , unit_of_measure (text) | Characteristics : characteristic_id (text) , characteristic_type_code (text) , characteristic_data_type (text) , characteristic_name (text) , other_characteristic_details (text) | Products : product_id (text) , color_code (text) , product_category_code (text) , product_name (text) , typical_buying_price (text) , typical_selling_price (text) , product_description (text) , other_product_details (text) | Product_Characteristics : product_id (text) , characteristic_id (text) , product_characteristic_value (text);</schema>"
<primary_keys>[Primary Keys]: ref_characteristic_types : characteristic_type_code, ref_colors : color_code, ref_product_categories : product_category_code, characteristics : characteristic_id, products : product_id</primary_keys>"
<foreign_keys>[Foreign Keys]: characteristics : characteristic_type_code = ref_characteristic_types : characteristic_type_code | products : color_code = ref_colors : color_code | products : product_category_code = ref_product_categories : product_category_code | product_characteristics : product_id = products : product_id | product_characteristics : characteristic_id = characteristics : characteristic_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>Return the name of the characteristic that is most common across all products.</question>
[SQL]:
| <SQL_QUERY>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</SQL_QUERY> | 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 | Return the name of the characteristic that is most common across all products. | [Schema (values) (types)]: | products_gen_characteristics | Ref_Characteristic_Types : characteristic_type_code (text) , characteristic_type_description (text) | Ref_Colors : color_code (text) , color_description (text) | Ref_Product_Categories : product_category_code (text) , product_category_description (text) , unit_of_measure (text) | Characteristics : characteristic_id (text) , characteristic_type_code (text) , characteristic_data_type (text) , characteristic_name (text) , other_characteristic_details (text) | Products : product_id (text) , color_code (text) , product_category_code (text) , product_name (text) , typical_buying_price (text) , typical_selling_price (text) , product_description (text) , other_product_details (text) | Product_Characteristics : product_id (text) , characteristic_id (text) , product_characteristic_value (text); | [Primary Keys]: ref_characteristic_types : characteristic_type_code, ref_colors : color_code, ref_product_categories : product_category_code, characteristics : characteristic_id, products : product_id | [Foreign Keys]: characteristics : characteristic_type_code = ref_characteristic_types : characteristic_type_code | products : color_code = ref_colors : color_code | products : product_category_code = ref_product_categories : product_category_code | product_characteristics : product_id = products : product_id | product_characteristics : characteristic_id = characteristics : characteristic_id |
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | products_gen_characteristics | Ref_Characteristic_Types : characteristic_type_code (text) , characteristic_type_description (text) | Ref_Colors : color_code (text) , color_description (text) | Ref_Product_Categories : product_category_code (text) , product_category_description (text) , unit_of_measure (text) | Characteristics : characteristic_id (text) , characteristic_type_code (text) , characteristic_data_type (text) , characteristic_name (text) , other_characteristic_details (text) | Products : product_id (text) , color_code (text) , product_category_code (text) , product_name (text) , typical_buying_price (text) , typical_selling_price (text) , product_description (text) , other_product_details (text) | Product_Characteristics : product_id (text) , characteristic_id (text) , product_characteristic_value (text);</schema>"
<primary_keys>[Primary Keys]: ref_characteristic_types : characteristic_type_code, ref_colors : color_code, ref_product_categories : product_category_code, characteristics : characteristic_id, products : product_id</primary_keys>"
<foreign_keys>[Foreign Keys]: characteristics : characteristic_type_code = ref_characteristic_types : characteristic_type_code | products : color_code = ref_colors : color_code | products : product_category_code = ref_product_categories : product_category_code | product_characteristics : product_id = products : product_id | product_characteristics : characteristic_id = characteristics : characteristic_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>What are the names, details and data types of the characteristics which are never used by any product?</question>
[SQL]:
| <SQL_QUERY>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</SQL_QUERY> | 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_id | What are the names, details and data types of the characteristics which are never used by any product? | [Schema (values) (types)]: | products_gen_characteristics | Ref_Characteristic_Types : characteristic_type_code (text) , characteristic_type_description (text) | Ref_Colors : color_code (text) , color_description (text) | Ref_Product_Categories : product_category_code (text) , product_category_description (text) , unit_of_measure (text) | Characteristics : characteristic_id (text) , characteristic_type_code (text) , characteristic_data_type (text) , characteristic_name (text) , other_characteristic_details (text) | Products : product_id (text) , color_code (text) , product_category_code (text) , product_name (text) , typical_buying_price (text) , typical_selling_price (text) , product_description (text) , other_product_details (text) | Product_Characteristics : product_id (text) , characteristic_id (text) , product_characteristic_value (text); | [Primary Keys]: ref_characteristic_types : characteristic_type_code, ref_colors : color_code, ref_product_categories : product_category_code, characteristics : characteristic_id, products : product_id | [Foreign Keys]: characteristics : characteristic_type_code = ref_characteristic_types : characteristic_type_code | products : color_code = ref_colors : color_code | products : product_category_code = ref_product_categories : product_category_code | product_characteristics : product_id = products : product_id | product_characteristics : characteristic_id = characteristics : characteristic_id |
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | products_gen_characteristics | Ref_Characteristic_Types : characteristic_type_code (text) , characteristic_type_description (text) | Ref_Colors : color_code (text) , color_description (text) | Ref_Product_Categories : product_category_code (text) , product_category_description (text) , unit_of_measure (text) | Characteristics : characteristic_id (text) , characteristic_type_code (text) , characteristic_data_type (text) , characteristic_name (text) , other_characteristic_details (text) | Products : product_id (text) , color_code (text) , product_category_code (text) , product_name (text) , typical_buying_price (text) , typical_selling_price (text) , product_description (text) , other_product_details (text) | Product_Characteristics : product_id (text) , characteristic_id (text) , product_characteristic_value (text);</schema>"
<primary_keys>[Primary Keys]: ref_characteristic_types : characteristic_type_code, ref_colors : color_code, ref_product_categories : product_category_code, characteristics : characteristic_id, products : product_id</primary_keys>"
<foreign_keys>[Foreign Keys]: characteristics : characteristic_type_code = ref_characteristic_types : characteristic_type_code | products : color_code = ref_colors : color_code | products : product_category_code = ref_product_categories : product_category_code | product_characteristics : product_id = products : product_id | product_characteristics : characteristic_id = characteristics : characteristic_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>Give the names, details, and data types of characteristics that are not found in any product.</question>
[SQL]:
| <SQL_QUERY>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</SQL_QUERY> | 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_id | Give the names, details, and data types of characteristics that are not found in any product. | [Schema (values) (types)]: | products_gen_characteristics | Ref_Characteristic_Types : characteristic_type_code (text) , characteristic_type_description (text) | Ref_Colors : color_code (text) , color_description (text) | Ref_Product_Categories : product_category_code (text) , product_category_description (text) , unit_of_measure (text) | Characteristics : characteristic_id (text) , characteristic_type_code (text) , characteristic_data_type (text) , characteristic_name (text) , other_characteristic_details (text) | Products : product_id (text) , color_code (text) , product_category_code (text) , product_name (text) , typical_buying_price (text) , typical_selling_price (text) , product_description (text) , other_product_details (text) | Product_Characteristics : product_id (text) , characteristic_id (text) , product_characteristic_value (text); | [Primary Keys]: ref_characteristic_types : characteristic_type_code, ref_colors : color_code, ref_product_categories : product_category_code, characteristics : characteristic_id, products : product_id | [Foreign Keys]: characteristics : characteristic_type_code = ref_characteristic_types : characteristic_type_code | products : color_code = ref_colors : color_code | products : product_category_code = ref_product_categories : product_category_code | product_characteristics : product_id = products : product_id | product_characteristics : characteristic_id = characteristics : characteristic_id |
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | products_gen_characteristics | Ref_Characteristic_Types : characteristic_type_code (text) , characteristic_type_description (text) | Ref_Colors : color_code (text) , color_description (text) | Ref_Product_Categories : product_category_code (text) , product_category_description (text) , unit_of_measure (text) | Characteristics : characteristic_id (text) , characteristic_type_code (text) , characteristic_data_type (text) , characteristic_name (text) , other_characteristic_details (text) | Products : product_id (text) , color_code (text) , product_category_code (text) , product_name (text) , typical_buying_price (text) , typical_selling_price (text) , product_description (text) , other_product_details (text) | Product_Characteristics : product_id (text) , characteristic_id (text) , product_characteristic_value (text);</schema>"
<primary_keys>[Primary Keys]: ref_characteristic_types : characteristic_type_code, ref_colors : color_code, ref_product_categories : product_category_code, characteristics : characteristic_id, products : product_id</primary_keys>"
<foreign_keys>[Foreign Keys]: characteristics : characteristic_type_code = ref_characteristic_types : characteristic_type_code | products : color_code = ref_colors : color_code | products : product_category_code = ref_product_categories : product_category_code | product_characteristics : product_id = products : product_id | product_characteristics : characteristic_id = characteristics : characteristic_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>What are characteristic names used at least twice across all products?</question>
[SQL]:
| <SQL_QUERY>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</SQL_QUERY> | 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 | What are characteristic names used at least twice across all products? | [Schema (values) (types)]: | products_gen_characteristics | Ref_Characteristic_Types : characteristic_type_code (text) , characteristic_type_description (text) | Ref_Colors : color_code (text) , color_description (text) | Ref_Product_Categories : product_category_code (text) , product_category_description (text) , unit_of_measure (text) | Characteristics : characteristic_id (text) , characteristic_type_code (text) , characteristic_data_type (text) , characteristic_name (text) , other_characteristic_details (text) | Products : product_id (text) , color_code (text) , product_category_code (text) , product_name (text) , typical_buying_price (text) , typical_selling_price (text) , product_description (text) , other_product_details (text) | Product_Characteristics : product_id (text) , characteristic_id (text) , product_characteristic_value (text); | [Primary Keys]: ref_characteristic_types : characteristic_type_code, ref_colors : color_code, ref_product_categories : product_category_code, characteristics : characteristic_id, products : product_id | [Foreign Keys]: characteristics : characteristic_type_code = ref_characteristic_types : characteristic_type_code | products : color_code = ref_colors : color_code | products : product_category_code = ref_product_categories : product_category_code | product_characteristics : product_id = products : product_id | product_characteristics : characteristic_id = characteristics : characteristic_id |
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
<schema>[Schema (values) (types)]: | products_gen_characteristics | Ref_Characteristic_Types : characteristic_type_code (text) , characteristic_type_description (text) | Ref_Colors : color_code (text) , color_description (text) | Ref_Product_Categories : product_category_code (text) , product_category_description (text) , unit_of_measure (text) | Characteristics : characteristic_id (text) , characteristic_type_code (text) , characteristic_data_type (text) , characteristic_name (text) , other_characteristic_details (text) | Products : product_id (text) , color_code (text) , product_category_code (text) , product_name (text) , typical_buying_price (text) , typical_selling_price (text) , product_description (text) , other_product_details (text) | Product_Characteristics : product_id (text) , characteristic_id (text) , product_characteristic_value (text);</schema>"
<primary_keys>[Primary Keys]: ref_characteristic_types : characteristic_type_code, ref_colors : color_code, ref_product_categories : product_category_code, characteristics : characteristic_id, products : product_id</primary_keys>"
<foreign_keys>[Foreign Keys]: characteristics : characteristic_type_code = ref_characteristic_types : characteristic_type_code | products : color_code = ref_colors : color_code | products : product_category_code = ref_product_categories : product_category_code | product_characteristics : product_id = products : product_id | product_characteristics : characteristic_id = characteristics : characteristic_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>Give the names of characteristics that are in two or more products?</question>
[SQL]:
| <SQL_QUERY>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</SQL_QUERY> | 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 | Give the names of characteristics that are in two or more products? | [Schema (values) (types)]: | products_gen_characteristics | Ref_Characteristic_Types : characteristic_type_code (text) , characteristic_type_description (text) | Ref_Colors : color_code (text) , color_description (text) | Ref_Product_Categories : product_category_code (text) , product_category_description (text) , unit_of_measure (text) | Characteristics : characteristic_id (text) , characteristic_type_code (text) , characteristic_data_type (text) , characteristic_name (text) , other_characteristic_details (text) | Products : product_id (text) , color_code (text) , product_category_code (text) , product_name (text) , typical_buying_price (text) , typical_selling_price (text) , product_description (text) , other_product_details (text) | Product_Characteristics : product_id (text) , characteristic_id (text) , product_characteristic_value (text); | [Primary Keys]: ref_characteristic_types : characteristic_type_code, ref_colors : color_code, ref_product_categories : product_category_code, characteristics : characteristic_id, products : product_id | [Foreign Keys]: characteristics : characteristic_type_code = ref_characteristic_types : characteristic_type_code | products : color_code = ref_colors : color_code | products : product_category_code = ref_product_categories : product_category_code | product_characteristics : product_id = products : product_id | product_characteristics : characteristic_id = characteristics : characteristic_id |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.