aherntech/sparc huggingface dataset:
Database: orchestra
Question sequence:
List the information of record companies.
When were they founded?
Please list the record companies of orchestras in descending order of years in which they were founded.
SQL query sequence:
SELECT Record_Company FROM orchestra
SELECT Record_Company, Year_of_Founded FROM orchestra
SELECT Record_Company FROM orchestra ORDER BY Year_of_Founded DESC
Final question: What are the record companies of orchestras in descending order of years in which they were founded?
Final SQL: SELECT Record_Company FROM orchestra ORDER BY Year_of_Founded DESC
Database: orchestra
Question sequence:
What is the attendance of each show?
What is the average attendance?
SQL query sequence:
SELECT Attendance FROM SHOW
SELECT avg(Attendance) FROM SHOW
Final question: What is the average attendance of shows?
Final SQL: SELECT avg(Attendance) FROM SHOW
Database: orchestra
Question sequence:
What are the shares of performances?
What are the shares of performances whose type is not "Live final"?
What are the maximum and the minimum of these values?
SQL query sequence:
SELECT SHARE FROM performance
SELECT SHARE FROM performance WHERE TYPE != "Live final"
SELECT max(SHARE) ,  min(SHARE) FROM performance WHERE TYPE != "Live final"
Final question: What are the maximum and minimum share of performances whose type is not "Live final".
Final SQL: SELECT max(SHARE) ,  min(SHARE) FROM performance WHERE TYPE != "Live final"
Database: orchestra
Question sequence:
List the nationalities of conductors.
How many are there?
SQL query sequence:
SELECT Nationality FROM conductor
SELECT count(DISTINCT Nationality) FROM conductor
Final question: How many different nationalities do conductors have?
Final SQL: SELECT count(DISTINCT Nationality) FROM conductor
Database: orchestra
Question sequence:
List the names of conductors.
List years of work of conductors.
List names of conductors in descending order of years of work.
SQL query sequence:
SELECT Name FROM conductor
SELECT Year_of_Work FROM conductor
SELECT Name FROM conductor ORDER BY Year_of_Work DESC
Final question: List names of conductors in descending order of years of work.
Final SQL: SELECT Name FROM conductor ORDER BY Year_of_Work DESC
Database: orchestra
Question sequence:
List the names of the conductors.
List years of work of conductors.
List the name of the conductor with the most years of work.
SQL query sequence:
SELECT Name FROM conductor
SELECT Year_of_Work FROM conductor
SELECT Name FROM conductor ORDER BY Year_of_Work DESC LIMIT 1
Final question: List the name of the conductor with the most years of work.
Final SQL: SELECT Name FROM conductor ORDER BY Year_of_Work DESC LIMIT 1
Database: orchestra
Question sequence:
Show the names of conductors.
Please list these names with the orchestras they have conducted.
SQL query sequence:
SELECT Name FROM conductor
SELECT T1.Name ,  T2.Orchestra FROM conductor AS T1 JOIN orchestra AS T2 ON T1.Conductor_ID  =  T2.Conductor_ID
Final question: Show the names of conductors and the orchestras they have conducted.
Final SQL: SELECT T1.Name ,  T2.Orchestra FROM conductor AS T1 JOIN orchestra AS T2 ON T1.Conductor_ID  =  T2.Conductor_ID
Database: orchestra
Question sequence:
Please show the names of the conductors.
Which of them have conducted more than one orchestras?
SQL query sequence:
SELECT Name FROM conductor
SELECT T1.Name FROM conductor AS T1 JOIN orchestra AS T2 ON T1.Conductor_ID  =  T2.Conductor_ID GROUP BY T2.Conductor_ID HAVING COUNT(*)  >  1
Final question: Show the names of conductors that have conducted more than one orchestras.
Final SQL: SELECT T1.Name FROM conductor AS T1 JOIN orchestra AS T2 ON T1.Conductor_ID  =  T2.Conductor_ID GROUP BY T2.Conductor_ID HAVING COUNT(*)  >  1
Database: orchestra
Question sequence:
Please show the names of the conductors.
Who has conducted the most orchestras?
SQL query sequence:
SELECT Name FROM conductor
SELECT T1.Name FROM conductor AS T1 JOIN orchestra AS T2 ON T1.Conductor_ID  =  T2.Conductor_ID GROUP BY T2.Conductor_ID ORDER BY COUNT(*) DESC LIMIT 1
Final question: Show the name of the conductor that has conducted the most number of orchestras.
Final SQL: SELECT T1.Name FROM conductor AS T1 JOIN orchestra AS T2 ON T1.Conductor_ID  =  T2.Conductor_ID GROUP BY T2.Conductor_ID ORDER BY COUNT(*) DESC LIMIT 1
Database: orchestra
Question sequence:
Please show the names of the conductors.
Who has conducted orchestras founded after 2008?
SQL query sequence:
SELECT Name FROM conductor
SELECT T1.Name FROM conductor AS T1 JOIN orchestra AS T2 ON T1.Conductor_ID  =  T2.Conductor_ID WHERE Year_of_Founded  >  2008
Final question: Please show the name of the conductor that has conducted orchestras founded after 2008.
Final SQL: SELECT T1.Name FROM conductor AS T1 JOIN orchestra AS T2 ON T1.Conductor_ID  =  T2.Conductor_ID WHERE Year_of_Founded  >  2008
Database: orchestra
Question sequence:
Please show the record companies without duplicates.
Please also show their corresponding number of orchestras.
SQL query sequence:
SELECT Record_Company FROM orchestra GROUP BY Record_Company
SELECT Record_Company ,  COUNT(*) FROM orchestra GROUP BY Record_Company
Final question: Please show the different record companies and the corresponding number of orchestras.
Final SQL: SELECT Record_Company ,  COUNT(*) FROM orchestra GROUP BY Record_Company
Database: orchestra
Question sequence:
Please show the record formats of orchestras.
Please list them in ascending order of count.
SQL query sequence:
SELECT Major_Record_Format FROM orchestra
SELECT Major_Record_Format FROM orchestra GROUP BY Major_Record_Format ORDER BY COUNT(*) ASC
Final question: Please show the record formats of orchestras in ascending order of count.
Final SQL: SELECT Major_Record_Format FROM orchestra GROUP BY Major_Record_Format ORDER BY COUNT(*) ASC
Database: orchestra
Question sequence:
List the information of all record companies.
Which one is shared by the most orchestras?
SQL query sequence:
SELECT Record_Company FROM orchestra
SELECT Record_Company FROM orchestra GROUP BY Record_Company ORDER BY COUNT(*) DESC LIMIT 1
Final question: List the record company shared by the most number of orchestras.
Final SQL: SELECT Record_Company FROM orchestra GROUP BY Record_Company ORDER BY COUNT(*) DESC LIMIT 1
Database: orchestra
Question sequence:
List the names of orchestras.
Which of them have had no performances?
SQL query sequence:
SELECT Orchestra FROM orchestra
SELECT Orchestra FROM orchestra WHERE Orchestra_ID NOT IN (SELECT Orchestra_ID FROM performance)
Final question: List the names of orchestras that have no performance.
Final SQL: SELECT Orchestra FROM orchestra WHERE Orchestra_ID NOT IN (SELECT Orchestra_ID FROM performance)
Database: orchestra
Question sequence:
Please list the record companies.
Which of them are shared by orchestras founded before 2003?
Which of them are shared by orchestras founded after 2003?
Which of them are shared by orchestras founded before 2003 and after 2003?
SQL query sequence:
SELECT Record_Company FROM orchestra
SELECT Record_Company FROM orchestra WHERE Year_of_Founded  <  2003
SELECT Record_Company FROM orchestra WHERE Year_of_Founded  >  2003
SELECT Record_Company FROM orchestra WHERE Year_of_Founded  <  2003 INTERSECT SELECT Record_Company FROM orchestra WHERE Year_of_Founded  >  2003
Final question: Show the record companies shared by orchestras founded before 2003 and after 2003.
Final SQL: SELECT Record_Company FROM orchestra WHERE Year_of_Founded  <  2003 INTERSECT SELECT Record_Company FROM orchestra WHERE Year_of_Founded  >  2003
Database: orchestra
Question sequence:
List the orchestras whose record format is "CD" or "DVD".
How many of these orchestras are there?
SQL query sequence:
SELECT * FROM orchestra WHERE Major_Record_Format  =  "CD" OR Major_Record_Format  =  "DVD"
SELECT COUNT(*) FROM orchestra WHERE Major_Record_Format  =  "CD" OR Major_Record_Format  =  "DVD"
Final question: Find the number of orchestras whose record format is "CD" or "DVD".
Final SQL: SELECT COUNT(*) FROM orchestra WHERE Major_Record_Format  =  "CD" OR Major_Record_Format  =  "DVD"
Database: cre_Doc_Template_Mgt
Question sequence:
Show information for all documents.
Show their ids.
Also show their document names and document descriptions.
SQL query sequence:
SELECT * FROM Documents
SELECT document_id FROM Documents
SELECT document_id ,  document_name ,  document_description FROM Documents
Final question: List document IDs, document names, and document descriptions for all documents.
Final SQL: SELECT document_id ,  document_name ,  document_description FROM Documents
Database: cre_Doc_Template_Mgt
Question sequence:
Show the document name for all documents.
Also show their description.
Which one has description with the letter 'w' in it?
Show its name and template id.
SQL query sequence:
SELECT document_name FROM Documents
SELECT document_name, Document_Description FROM Documents
SELECT document_name FROM Documents WHERE Document_Description LIKE "%w%"
SELECT document_name ,  template_id FROM Documents WHERE Document_Description LIKE "%w%"
Final question: What is the document name and template id for document with description with the letter 'w' in it?
Final SQL: SELECT document_name ,  template_id FROM Documents WHERE Document_Description LIKE "%w%"
Database: cre_Doc_Template_Mgt
Question sequence:
Show the the document name for all documents.
Show the document id for the one named "Robbin CV"?
Also show its template id and description.
SQL query sequence:
SELECT document_name from Documents
SELECT document_id FROM Documents WHERE document_name  =  "Robbin CV"
SELECT document_id ,  template_id ,  Document_Description FROM Documents WHERE document_name  =  "Robbin CV"
Final question: What is the document id, template id and description for document named "Robbin CV"?
Final SQL: SELECT document_id ,  template_id ,  Document_Description FROM Documents WHERE document_name  =  "Robbin CV"
Database: cre_Doc_Template_Mgt
Question sequence:
Show the template id for all documents.
Show all distinct results.
How many are there?
SQL query sequence:
SELECT template_id FROM Documents
SELECT DISTINCT template_id FROM Documents
SELECT count(DISTINCT template_id) FROM Documents
Final question: How many different templates do all document use?
Final SQL: SELECT count(DISTINCT template_id) FROM Documents
Database: cre_Doc_Template_Mgt
Question sequence:
Show the document ids.
Also show their template id and template type code.
Which documents are using the template with type code 'PPT'?
How many are there?
SQL query sequence:
SELECT document_id FROM Documents
SELECT T1.document_id, T2.Template_ID, T2.Template_Type_Code FROM Documents AS T1 JOIN Templates AS T2 ON T1.Template_ID  =  T2.Template_ID
SELECT T1.document_id FROM Documents AS T1 JOIN Templates AS T2 ON T1.Template_ID  =  T2.Template_ID where T2.Template_Type_Code  =  'PPT'
SELECT count(*) FROM Documents AS T1 JOIN Templates AS T2 ON T1.Template_ID  =  T2.Template_ID WHERE T2.Template_Type_Code  =  'PPT'
Final question: How many documents are using the template with type code 'PPT'?
Final SQL: SELECT count(*) FROM Documents AS T1 JOIN Templates AS T2 ON T1.Template_ID  =  T2.Template_ID WHERE T2.Template_Type_Code  =  'PPT'
Database: cre_Doc_Template_Mgt
Question sequence:
Show the template id for all documents.
For each of them, show the number of documents using it.
SQL query sequence:
SELECT template_id FROM Documents
SELECT template_id ,  count(*) FROM Documents GROUP BY template_id
Final question: Show all template ids and number of documents using each template.
Final SQL: SELECT template_id ,  count(*) FROM Documents GROUP BY template_id
Database: cre_Doc_Template_Mgt
Question sequence:
Show the template id for all Documents.
Also show its template type code.
For each of them, show the number of documents using it.
Which one has the most?
SQL query sequence:
SELECT template_id FROM Documents
SELECT T1.template_id ,  T2.Template_Type_Code FROM Documents AS T1 JOIN Templates AS T2 ON T1.template_id  =  T2.template_id
SELECT count(*), T1.template_id ,  T2.Template_Type_Code FROM Documents AS T1 JOIN Templates AS T2 ON T1.template_id  =  T2.template_id GROUP BY T1.template_id
SELECT T1.template_id ,  T2.Template_Type_Code FROM Documents AS T1 JOIN Templates AS T2 ON T1.template_id  =  T2.template_id GROUP BY T1.template_id ORDER BY count(*) DESC LIMIT 1
Final question: What is the id and type code for the template used by the most documents?
Final SQL: SELECT T1.template_id ,  T2.Template_Type_Code FROM Documents AS T1 JOIN Templates AS T2 ON T1.template_id  =  T2.template_id GROUP BY T1.template_id ORDER BY count(*) DESC LIMIT 1
Database: cre_Doc_Template_Mgt
Question sequence:
Show the template id for all documents.
For each of them, show the number of documents.
Which of them are used by more than one document?
SQL query sequence:
SELECT template_id FROM Documents
SELECT template_id, count(*) FROM Documents GROUP BY template_id
SELECT template_id FROM Documents GROUP BY template_id HAVING count(*)  >  1
Final question: Show ids for all templates that are used by more than one document.
Final SQL: SELECT template_id FROM Documents GROUP BY template_id HAVING count(*)  >  1
Database: cre_Doc_Template_Mgt
Question sequence:
Show template ids used by some document.
Show all template ids.
Which of them are not used by any document?
SQL query sequence:
SELECT template_id FROM Documents
SELECT template_id FROM Templates
SELECT template_id FROM Templates EXCEPT SELECT template_id FROM Documents
Final question: Show ids for all templates not used by any document.
Final SQL: SELECT template_id FROM Templates EXCEPT SELECT template_id FROM Documents
Database: cre_Doc_Template_Mgt
Question sequence:
Show info for all templates.
How many are there?
SQL query sequence:
SELECT * FROM Templates
SELECT count(*) FROM Templates
Final question: How many templates do we have?
Final SQL: SELECT count(*) FROM Templates
Database: cre_Doc_Template_Mgt
Question sequence:
Show template ids for all templates.
Also show their version numbers and template type codes.
SQL query sequence:
SELECT template_id FROM Templates
SELECT template_id ,  version_number ,  template_type_code FROM Templates
Final question: Show template ids, version numbers, and template type codes for all templates.
Final SQL: SELECT template_id ,  version_number ,  template_type_code FROM Templates
Database: cre_Doc_Template_Mgt
Question sequence:
Show all template type codes for all templates.
Filter out duplicates.
SQL query sequence:
SELECT template_type_code FROM Templates
SELECT DISTINCT template_type_code FROM Templates
Final question: Show all distinct template type codes for all templates.
Final SQL: SELECT DISTINCT template_type_code FROM Templates
Database: cre_Doc_Template_Mgt
Question sequence:
Show the template ids for all templates.
How about the ids with template type code PP or PPT?
SQL query sequence:
SELECT template_id FROM Templates
SELECT template_id FROM Templates WHERE template_type_code  =  "PP" OR template_type_code  =  "PPT"
Final question: What are the ids of templates with template type code PP or PPT?
Final SQL: SELECT template_id FROM Templates WHERE template_type_code  =  "PP" OR template_type_code  =  "PPT"
Database: cre_Doc_Template_Mgt
Question sequence:
Show the template type codes for all templates.
How many of them have template type code CV?
SQL query sequence:
SELECT template_type_code FROM Templates
SELECT count(*) FROM Templates WHERE template_type_code  =  "CV"
Final question: How many templates have template type code CV?
Final SQL: SELECT count(*) FROM Templates WHERE template_type_code  =  "CV"
Database: cre_Doc_Template_Mgt
Question sequence:
What is the version number for all template?
Only show those with version number later than 5.
Also show their template type code.
SQL query sequence:
SELECT version_number FROM Templates
SELECT version_number FROM Templates WHERE version_number  >  5
SELECT version_number ,  template_type_code FROM Templates WHERE version_number  >  5
Final question: What is the version number and template type code for the template with version number later than 5?
Final SQL: SELECT version_number ,  template_type_code FROM Templates WHERE version_number  >  5
Database: cre_Doc_Template_Mgt
Question sequence:
Show the template type code for all templates.
For each of them, count the number of templates
SQL query sequence:
SELECT template_type_code FROM Templates
SELECT template_type_code ,  count(*) FROM Templates GROUP BY template_type_code
Final question: Show all template type codes and number of templates for each.
Final SQL: SELECT template_type_code ,  count(*) FROM Templates GROUP BY template_type_code
Database: cre_Doc_Template_Mgt
Question sequence:
Show all type codes for templates.
For each of them, how many templates do they contain?
Which of them contains the most templates?
SQL query sequence:
SELECT template_type_code FROM Templates
SELECT template_type_code, count(*) FROM Templates GROUP BY template_type_code
SELECT template_type_code FROM Templates GROUP BY template_type_code ORDER BY count(*) DESC LIMIT 1
Final question: Which template type code has most number of templates?
Final SQL: SELECT template_type_code FROM Templates GROUP BY template_type_code ORDER BY count(*) DESC LIMIT 1
Database: cre_Doc_Template_Mgt
Question sequence:
Show all template type codes.
For each of them, show the count of templates.
Which of them have fewer than three templates?
SQL query sequence:
SELECT template_type_code FROM Templates
SELECT template_type_code, count(*) FROM Templates GROUP BY template_type_code
SELECT template_type_code FROM Templates GROUP BY template_type_code HAVING count(*)  <  3
Final question: Show all template type codes with less than three templates.
Final SQL: SELECT template_type_code FROM Templates GROUP BY template_type_code HAVING count(*)  <  3
Database: cre_Doc_Template_Mgt
Question sequence:
Show the version number for all templates.
What is the smallest value?
Also show its template type code.
SQL query sequence:
SELECT Version_Number FROM Templates
SELECT min(Version_Number) FROM Templates
SELECT min(Version_Number) ,  template_type_code FROM Templates
Final question: What the smallest version number and its template type code?
Final SQL: SELECT min(Version_Number) ,  template_type_code FROM Templates
Database: cre_Doc_Template_Mgt
Question sequence:
What is the template type code of the template.
Also show the names of all documents using each template.
Which of the template type codes is used by document with the name "Data base"?
SQL query sequence:
SELECT template_type_code FROM Templates
SELECT T1.template_type_code, T2.document_name FROM Templates AS T1 JOIN Documents AS T2 ON T1.template_id  =  T2.template_id
SELECT T1.template_type_code FROM Templates AS T1 JOIN Documents AS T2 ON T1.template_id  =  T2.template_id WHERE T2.document_name  =  "Data base"
Final question: What is the template type code of the template used by document with the name "Data base"?
Final SQL: SELECT T1.template_type_code FROM Templates AS T1 JOIN Documents AS T2 ON T1.template_id  =  T2.template_id WHERE T2.document_name  =  "Data base"
Database: cre_Doc_Template_Mgt
Question sequence:
Show all document names.
Also show their template type codes.
Which of the documents are using templates with template type code BK?
SQL query sequence:
SELECT document_name FROM Documents
SELECT T2.document_name, T1.template_type_code FROM Templates AS T1 JOIN Documents AS T2 ON T1.template_id  =  T2.template_id
SELECT T2.document_name FROM Templates AS T1 JOIN Documents AS T2 ON T1.template_id  =  T2.template_id WHERE T1.template_type_code  =  "BK"
Final question: Show all document names using templates with template type code BK.
Final SQL: SELECT T2.document_name FROM Templates AS T1 JOIN Documents AS T2 ON T1.template_id  =  T2.template_id WHERE T1.template_type_code  =  "BK"
Database: cre_Doc_Template_Mgt
Question sequence:
Show all template type codes.
Also show the document ids using each template.
For each type code, how many documents are using that template?
SQL query sequence:
SELECT template_type_code FROM Templates
SELECT T1.template_type_code , T2.document_id FROM Templates AS T1 JOIN Documents AS T2 ON T1.template_id  =  T2.template_id
SELECT T1.template_type_code ,  count(*) FROM Templates AS T1 JOIN Documents AS T2 ON T1.template_id  =  T2.template_id GROUP BY T1.template_type_code
Final question: Show all template type codes and the number of documents using each type.
Final SQL: SELECT T1.template_type_code ,  count(*) FROM Templates AS T1 JOIN Documents AS T2 ON T1.template_id  =  T2.template_id GROUP BY T1.template_type_code
Database: cre_Doc_Template_Mgt
Question sequence:
Show the type codes for all templates.
For each, how many documents are using this template?
Order the template type codes in descending order by this number.
Which of them has the most?
SQL query sequence:
SELECT template_type_code FROM Templates
SELECT T1.template_type_code, count(*) FROM Templates AS T1 JOIN Documents AS T2 ON T1.template_id  =  T2.template_id GROUP BY T1.template_type_code
SELECT T1.template_type_code FROM Templates AS T1 JOIN Documents AS T2 ON T1.template_id  =  T2.template_id GROUP BY T1.template_type_code ORDER BY count(*) DESC
SELECT T1.template_type_code FROM Templates AS T1 JOIN Documents AS T2 ON T1.template_id  =  T2.template_id GROUP BY T1.template_type_code ORDER BY count(*) DESC LIMIT 1
Final question: Which template type code is used by most number of documents?
Final SQL: SELECT T1.template_type_code FROM Templates AS T1 JOIN Documents AS T2 ON T1.template_id  =  T2.template_id GROUP BY T1.template_type_code ORDER BY count(*) DESC LIMIT 1
Database: cre_Doc_Template_Mgt
Question sequence:
Show all template type codes.
Show all template type codes that are used by some document.
How about those that are not used by any document?
SQL query sequence:
SELECT template_type_code FROM Templates
SELECT template_type_code FROM Templates AS T1 JOIN Documents AS T2 ON T1.template_id  =  T2.template_id
SELECT template_type_code FROM Templates EXCEPT SELECT template_type_code FROM Templates AS T1 JOIN Documents AS T2 ON T1.template_id  =  T2.template_id
Final question: Show all template type codes that are not used by any document.
Final SQL: SELECT template_type_code FROM Templates EXCEPT SELECT template_type_code FROM Templates AS T1 JOIN Documents AS T2 ON T1.template_id  =  T2.template_id
Database: cre_Doc_Template_Mgt
Question sequence:
Show all template type codes.
Also show their descriptions.
SQL query sequence:
SELECT template_type_code FROM Ref_template_types
SELECT template_type_code ,  template_type_description FROM Ref_template_types
Final question: Show all template type codes and descriptions.
Final SQL: SELECT template_type_code ,  template_type_description FROM Ref_template_types
Database: cre_Doc_Template_Mgt
Question sequence:
Show all template type codes and descriptions.
What is the description for template type code "AD"?
SQL query sequence:
SELECT template_type_code ,  template_type_description FROM Ref_template_types
SELECT template_type_description FROM Ref_template_types WHERE template_type_code  =  "AD"
Final question: What is the template type descriptions for template type code "AD".
Final SQL: SELECT template_type_description FROM Ref_template_types WHERE template_type_code  =  "AD"
Database: cre_Doc_Template_Mgt
Question sequence:
Show all template type codes.
Also show descriptions.
Which code has template type description "Book"?
SQL query sequence:
SELECT template_type_code FROM Ref_template_types
SELECT template_type_code , template_type_description FROM Ref_template_types
SELECT template_type_code FROM Ref_template_types WHERE template_type_description  =  "Book"
Final question: What is the template type code for template type description "Book".
Final SQL: SELECT template_type_code FROM Ref_template_types WHERE template_type_description  =  "Book"