Input:
[INST] Here is a database schema:
basketball_match :
Team_ID [ INT ] primary_key
School_ID [ INT ] basketball_match.School_ID = university.School_ID
Team_Name [ TEXT ]
ACC_Regular_Season [ TEXT ]
ACC_Percent [ TEXT ]
ACC_Home [ TEXT ]
ACC_Road [ TEXT ]
All_Games [ TEXT ]
All_Games_Percent [ INT ]
All_Home [ TEXT ]
All_Road [ TEXT ]
All_Neutral [ TEXT ]

university :
School_ID [ INT ] primary_key
School [ TEXT ]
Location [ TEXT ]
Founded [ INT ]
Affiliation [ TEXT ]
Enrollment [ INT ]
Nickname [ TEXT ]
Primary_conference [ TEXT ]

Please write me a SQL statement that answers the following question: List all public schools and their locations. [/INST]

Output: SELECT school ,  LOCATION FROM university WHERE affiliation  =  'Public';


Input:
[INST] Here is a database schema:
basketball_match :
Team_ID [ INT ] primary_key
School_ID [ INT ] basketball_match.School_ID = university.School_ID
Team_Name [ TEXT ]
ACC_Regular_Season [ TEXT ]
ACC_Percent [ TEXT ]
ACC_Home [ TEXT ]
ACC_Road [ TEXT ]
All_Games [ TEXT ]
All_Games_Percent [ INT ]
All_Home [ TEXT ]
All_Road [ TEXT ]
All_Neutral [ TEXT ]

university :
School_ID [ INT ] primary_key
School [ TEXT ]
Location [ TEXT ]
Founded [ INT ]
Affiliation [ TEXT ]
Enrollment [ INT ]
Nickname [ TEXT ]
Primary_conference [ TEXT ]

Please write me a SQL statement that answers the following question: What are the public schools and what are their locations? [/INST]

Output: SELECT school ,  LOCATION FROM university WHERE affiliation  =  'Public';


Input:
[INST] Here is a database schema:
basketball_match :
Team_ID [ INT ] primary_key
School_ID [ INT ] basketball_match.School_ID = university.School_ID
Team_Name [ TEXT ]
ACC_Regular_Season [ TEXT ]
ACC_Percent [ TEXT ]
ACC_Home [ TEXT ]
ACC_Road [ TEXT ]
All_Games [ TEXT ]
All_Games_Percent [ INT ]
All_Home [ TEXT ]
All_Road [ TEXT ]
All_Neutral [ TEXT ]

university :
School_ID [ INT ] primary_key
School [ TEXT ]
Location [ TEXT ]
Founded [ INT ]
Affiliation [ TEXT ]
Enrollment [ INT ]
Nickname [ TEXT ]
Primary_conference [ TEXT ]

Please write me a SQL statement that answers the following question: When was the school with the largest enrollment founded? [/INST]

Output: SELECT founded FROM university ORDER BY enrollment DESC LIMIT 1;


Input:
[INST] Here is a database schema:
basketball_match :
Team_ID [ INT ] primary_key
School_ID [ INT ] basketball_match.School_ID = university.School_ID
Team_Name [ TEXT ]
ACC_Regular_Season [ TEXT ]
ACC_Percent [ TEXT ]
ACC_Home [ TEXT ]
ACC_Road [ TEXT ]
All_Games [ TEXT ]
All_Games_Percent [ INT ]
All_Home [ TEXT ]
All_Road [ TEXT ]
All_Neutral [ TEXT ]

university :
School_ID [ INT ] primary_key
School [ TEXT ]
Location [ TEXT ]
Founded [ INT ]
Affiliation [ TEXT ]
Enrollment [ INT ]
Nickname [ TEXT ]
Primary_conference [ TEXT ]

Please write me a SQL statement that answers the following question: Return the founded year for the school with the largest enrollment. [/INST]

Output: SELECT founded FROM university ORDER BY enrollment DESC LIMIT 1;


Input:
[INST] Here is a database schema:
basketball_match :
Team_ID [ INT ] primary_key
School_ID [ INT ] basketball_match.School_ID = university.School_ID
Team_Name [ TEXT ]
ACC_Regular_Season [ TEXT ]
ACC_Percent [ TEXT ]
ACC_Home [ TEXT ]
ACC_Road [ TEXT ]
All_Games [ TEXT ]
All_Games_Percent [ INT ]
All_Home [ TEXT ]
All_Road [ TEXT ]
All_Neutral [ TEXT ]

university :
School_ID [ INT ] primary_key
School [ TEXT ]
Location [ TEXT ]
Founded [ INT ]
Affiliation [ TEXT ]
Enrollment [ INT ]
Nickname [ TEXT ]
Primary_conference [ TEXT ]

Please write me a SQL statement that answers the following question: Find the founded year of the newest non public school. [/INST]

Output: SELECT founded FROM university WHERE affiliation != 'Public' ORDER BY founded DESC LIMIT 1;


Input:
[INST] Here is a database schema:
basketball_match :
Team_ID [ INT ] primary_key
School_ID [ INT ] basketball_match.School_ID = university.School_ID
Team_Name [ TEXT ]
ACC_Regular_Season [ TEXT ]
ACC_Percent [ TEXT ]
ACC_Home [ TEXT ]
ACC_Road [ TEXT ]
All_Games [ TEXT ]
All_Games_Percent [ INT ]
All_Home [ TEXT ]
All_Road [ TEXT ]
All_Neutral [ TEXT ]

university :
School_ID [ INT ] primary_key
School [ TEXT ]
Location [ TEXT ]
Founded [ INT ]
Affiliation [ TEXT ]
Enrollment [ INT ]
Nickname [ TEXT ]
Primary_conference [ TEXT ]

Please write me a SQL statement that answers the following question: What is the founded year of the non public school that was founded most recently? [/INST]

Output: SELECT founded FROM university WHERE affiliation != 'Public' ORDER BY founded DESC LIMIT 1;


Input:
[INST] Here is a database schema:
basketball_match :
Team_ID [ INT ] primary_key
School_ID [ INT ] basketball_match.School_ID = university.School_ID
Team_Name [ TEXT ]
ACC_Regular_Season [ TEXT ]
ACC_Percent [ TEXT ]
ACC_Home [ TEXT ]
ACC_Road [ TEXT ]
All_Games [ TEXT ]
All_Games_Percent [ INT ]
All_Home [ TEXT ]
All_Road [ TEXT ]
All_Neutral [ TEXT ]

university :
School_ID [ INT ] primary_key
School [ TEXT ]
Location [ TEXT ]
Founded [ INT ]
Affiliation [ TEXT ]
Enrollment [ INT ]
Nickname [ TEXT ]
Primary_conference [ TEXT ]

Please write me a SQL statement that answers the following question: How many schools are in the basketball match? [/INST]

Output: SELECT count(DISTINCT school_id) FROM basketball_match;


Input:
[INST] Here is a database schema:
basketball_match :
Team_ID [ INT ] primary_key
School_ID [ INT ] basketball_match.School_ID = university.School_ID
Team_Name [ TEXT ]
ACC_Regular_Season [ TEXT ]
ACC_Percent [ TEXT ]
ACC_Home [ TEXT ]
ACC_Road [ TEXT ]
All_Games [ TEXT ]
All_Games_Percent [ INT ]
All_Home [ TEXT ]
All_Road [ TEXT ]
All_Neutral [ TEXT ]

university :
School_ID [ INT ] primary_key
School [ TEXT ]
Location [ TEXT ]
Founded [ INT ]
Affiliation [ TEXT ]
Enrollment [ INT ]
Nickname [ TEXT ]
Primary_conference [ TEXT ]

Please write me a SQL statement that answers the following question: Count the number of schools that have had basketball matches. [/INST]

Output: SELECT count(DISTINCT school_id) FROM basketball_match;


Input:
[INST] Here is a database schema:
basketball_match :
Team_ID [ INT ] primary_key
School_ID [ INT ] basketball_match.School_ID = university.School_ID
Team_Name [ TEXT ]
ACC_Regular_Season [ TEXT ]
ACC_Percent [ TEXT ]
ACC_Home [ TEXT ]
ACC_Road [ TEXT ]
All_Games [ TEXT ]
All_Games_Percent [ INT ]
All_Home [ TEXT ]
All_Road [ TEXT ]
All_Neutral [ TEXT ]

university :
School_ID [ INT ] primary_key
School [ TEXT ]
Location [ TEXT ]
Founded [ INT ]
Affiliation [ TEXT ]
Enrollment [ INT ]
Nickname [ TEXT ]
Primary_conference [ TEXT ]

Please write me a SQL statement that answers the following question: What is the highest acc percent score in the competition? [/INST]

Output: SELECT acc_percent FROM basketball_match ORDER BY acc_percent DESC LIMIT 1;


Input:
[INST] Here is a database schema:
basketball_match :
Team_ID [ INT ] primary_key
School_ID [ INT ] basketball_match.School_ID = university.School_ID
Team_Name [ TEXT ]
ACC_Regular_Season [ TEXT ]
ACC_Percent [ TEXT ]
ACC_Home [ TEXT ]
ACC_Road [ TEXT ]
All_Games [ TEXT ]
All_Games_Percent [ INT ]
All_Home [ TEXT ]
All_Road [ TEXT ]
All_Neutral [ TEXT ]

university :
School_ID [ INT ] primary_key
School [ TEXT ]
Location [ TEXT ]
Founded [ INT ]
Affiliation [ TEXT ]
Enrollment [ INT ]
Nickname [ TEXT ]
Primary_conference [ TEXT ]

Please write me a SQL statement that answers the following question: Return the highest acc percent across all basketball matches. [/INST]

Output: SELECT acc_percent FROM basketball_match ORDER BY acc_percent DESC LIMIT 1;


Input:
[INST] Here is a database schema:
basketball_match :
Team_ID [ INT ] primary_key
School_ID [ INT ] basketball_match.School_ID = university.School_ID
Team_Name [ TEXT ]
ACC_Regular_Season [ TEXT ]
ACC_Percent [ TEXT ]
ACC_Home [ TEXT ]
ACC_Road [ TEXT ]
All_Games [ TEXT ]
All_Games_Percent [ INT ]
All_Home [ TEXT ]
All_Road [ TEXT ]
All_Neutral [ TEXT ]

university :
School_ID [ INT ] primary_key
School [ TEXT ]
Location [ TEXT ]
Founded [ INT ]
Affiliation [ TEXT ]
Enrollment [ INT ]
Nickname [ TEXT ]
Primary_conference [ TEXT ]

Please write me a SQL statement that answers the following question: What is the primary conference of the school that has the lowest acc percent score in the competition? [/INST]

Output: SELECT t1.Primary_conference FROM university AS t1 JOIN basketball_match AS t2 ON t1.school_id  =  t2.school_id ORDER BY t2.acc_percent LIMIT 1;


Input:
[INST] Here is a database schema:
basketball_match :
Team_ID [ INT ] primary_key
School_ID [ INT ] basketball_match.School_ID = university.School_ID
Team_Name [ TEXT ]
ACC_Regular_Season [ TEXT ]
ACC_Percent [ TEXT ]
ACC_Home [ TEXT ]
ACC_Road [ TEXT ]
All_Games [ TEXT ]
All_Games_Percent [ INT ]
All_Home [ TEXT ]
All_Road [ TEXT ]
All_Neutral [ TEXT ]

university :
School_ID [ INT ] primary_key
School [ TEXT ]
Location [ TEXT ]
Founded [ INT ]
Affiliation [ TEXT ]
Enrollment [ INT ]
Nickname [ TEXT ]
Primary_conference [ TEXT ]

Please write me a SQL statement that answers the following question: Return the primary conference of the school with the lowest acc percentage score. [/INST]

Output: SELECT t1.Primary_conference FROM university AS t1 JOIN basketball_match AS t2 ON t1.school_id  =  t2.school_id ORDER BY t2.acc_percent LIMIT 1;


Input:
[INST] Here is a database schema:
basketball_match :
Team_ID [ INT ] primary_key
School_ID [ INT ] basketball_match.School_ID = university.School_ID
Team_Name [ TEXT ]
ACC_Regular_Season [ TEXT ]
ACC_Percent [ TEXT ]
ACC_Home [ TEXT ]
ACC_Road [ TEXT ]
All_Games [ TEXT ]
All_Games_Percent [ INT ]
All_Home [ TEXT ]
All_Road [ TEXT ]
All_Neutral [ TEXT ]

university :
School_ID [ INT ] primary_key
School [ TEXT ]
Location [ TEXT ]
Founded [ INT ]
Affiliation [ TEXT ]
Enrollment [ INT ]
Nickname [ TEXT ]
Primary_conference [ TEXT ]

Please write me a SQL statement that answers the following question: What is the team name and acc regular season score of the school that was founded for the longest time? [/INST]

Output: SELECT t2.team_name ,  t2.ACC_Regular_Season FROM university AS t1 JOIN basketball_match AS t2 ON t1.school_id  =  t2.school_id ORDER BY t1.founded LIMIT 1;


Input:
[INST] Here is a database schema:
basketball_match :
Team_ID [ INT ] primary_key
School_ID [ INT ] basketball_match.School_ID = university.School_ID
Team_Name [ TEXT ]
ACC_Regular_Season [ TEXT ]
ACC_Percent [ TEXT ]
ACC_Home [ TEXT ]
ACC_Road [ TEXT ]
All_Games [ TEXT ]
All_Games_Percent [ INT ]
All_Home [ TEXT ]
All_Road [ TEXT ]
All_Neutral [ TEXT ]

university :
School_ID [ INT ] primary_key
School [ TEXT ]
Location [ TEXT ]
Founded [ INT ]
Affiliation [ TEXT ]
Enrollment [ INT ]
Nickname [ TEXT ]
Primary_conference [ TEXT ]

Please write me a SQL statement that answers the following question: Return the name of the team and the acc during the regular season for the school that was founded the earliest. [/INST]

Output: SELECT t2.team_name ,  t2.ACC_Regular_Season FROM university AS t1 JOIN basketball_match AS t2 ON t1.school_id  =  t2.school_id ORDER BY t1.founded LIMIT 1;


Input:
[INST] Here is a database schema:
basketball_match :
Team_ID [ INT ] primary_key
School_ID [ INT ] basketball_match.School_ID = university.School_ID
Team_Name [ TEXT ]
ACC_Regular_Season [ TEXT ]
ACC_Percent [ TEXT ]
ACC_Home [ TEXT ]
ACC_Road [ TEXT ]
All_Games [ TEXT ]
All_Games_Percent [ INT ]
All_Home [ TEXT ]
All_Road [ TEXT ]
All_Neutral [ TEXT ]

university :
School_ID [ INT ] primary_key
School [ TEXT ]
Location [ TEXT ]
Founded [ INT ]
Affiliation [ TEXT ]
Enrollment [ INT ]
Nickname [ TEXT ]
Primary_conference [ TEXT ]

Please write me a SQL statement that answers the following question: Find the location and all games score of the school that has Clemson as its team name. [/INST]

Output: SELECT t2.All_Games ,  t1.location FROM university AS t1 JOIN basketball_match AS t2 ON t1.school_id  =  t2.school_id WHERE team_name  =  'Clemson';


Input:
[INST] Here is a database schema:
basketball_match :
Team_ID [ INT ] primary_key
School_ID [ INT ] basketball_match.School_ID = university.School_ID
Team_Name [ TEXT ]
ACC_Regular_Season [ TEXT ]
ACC_Percent [ TEXT ]
ACC_Home [ TEXT ]
ACC_Road [ TEXT ]
All_Games [ TEXT ]
All_Games_Percent [ INT ]
All_Home [ TEXT ]
All_Road [ TEXT ]
All_Neutral [ TEXT ]

university :
School_ID [ INT ] primary_key
School [ TEXT ]
Location [ TEXT ]
Founded [ INT ]
Affiliation [ TEXT ]
Enrollment [ INT ]
Nickname [ TEXT ]
Primary_conference [ TEXT ]

Please write me a SQL statement that answers the following question: What are the all games score and location of the school called Clemson? [/INST]

Output: SELECT t2.All_Games ,  t1.location FROM university AS t1 JOIN basketball_match AS t2 ON t1.school_id  =  t2.school_id WHERE team_name  =  'Clemson';


Input:
[INST] Here is a database schema:
basketball_match :
Team_ID [ INT ] primary_key
School_ID [ INT ] basketball_match.School_ID = university.School_ID
Team_Name [ TEXT ]
ACC_Regular_Season [ TEXT ]
ACC_Percent [ TEXT ]
ACC_Home [ TEXT ]
ACC_Road [ TEXT ]
All_Games [ TEXT ]
All_Games_Percent [ INT ]
All_Home [ TEXT ]
All_Road [ TEXT ]
All_Neutral [ TEXT ]

university :
School_ID [ INT ] primary_key
School [ TEXT ]
Location [ TEXT ]
Founded [ INT ]
Affiliation [ TEXT ]
Enrollment [ INT ]
Nickname [ TEXT ]
Primary_conference [ TEXT ]

Please write me a SQL statement that answers the following question: What are the average enrollment size of the universities that are founded before 1850? [/INST]

Output: SELECT avg(enrollment) FROM university WHERE founded  <  1850;


Input:
[INST] Here is a database schema:
basketball_match :
Team_ID [ INT ] primary_key
School_ID [ INT ] basketball_match.School_ID = university.School_ID
Team_Name [ TEXT ]
ACC_Regular_Season [ TEXT ]
ACC_Percent [ TEXT ]
ACC_Home [ TEXT ]
ACC_Road [ TEXT ]
All_Games [ TEXT ]
All_Games_Percent [ INT ]
All_Home [ TEXT ]
All_Road [ TEXT ]
All_Neutral [ TEXT ]

university :
School_ID [ INT ] primary_key
School [ TEXT ]
Location [ TEXT ]
Founded [ INT ]
Affiliation [ TEXT ]
Enrollment [ INT ]
Nickname [ TEXT ]
Primary_conference [ TEXT ]

Please write me a SQL statement that answers the following question: Return the average enrollment of universities founded before 1850. [/INST]

Output: SELECT avg(enrollment) FROM university WHERE founded  <  1850;


Input:
[INST] Here is a database schema:
basketball_match :
Team_ID [ INT ] primary_key
School_ID [ INT ] basketball_match.School_ID = university.School_ID
Team_Name [ TEXT ]
ACC_Regular_Season [ TEXT ]
ACC_Percent [ TEXT ]
ACC_Home [ TEXT ]
ACC_Road [ TEXT ]
All_Games [ TEXT ]
All_Games_Percent [ INT ]
All_Home [ TEXT ]
All_Road [ TEXT ]
All_Neutral [ TEXT ]

university :
School_ID [ INT ] primary_key
School [ TEXT ]
Location [ TEXT ]
Founded [ INT ]
Affiliation [ TEXT ]
Enrollment [ INT ]
Nickname [ TEXT ]
Primary_conference [ TEXT ]

Please write me a SQL statement that answers the following question: Show the enrollment and primary_conference of the oldest college. [/INST]

Output: SELECT enrollment ,  primary_conference FROM university ORDER BY founded LIMIT 1;


Input:
[INST] Here is a database schema:
basketball_match :
Team_ID [ INT ] primary_key
School_ID [ INT ] basketball_match.School_ID = university.School_ID
Team_Name [ TEXT ]
ACC_Regular_Season [ TEXT ]
ACC_Percent [ TEXT ]
ACC_Home [ TEXT ]
ACC_Road [ TEXT ]
All_Games [ TEXT ]
All_Games_Percent [ INT ]
All_Home [ TEXT ]
All_Road [ TEXT ]
All_Neutral [ TEXT ]

university :
School_ID [ INT ] primary_key
School [ TEXT ]
Location [ TEXT ]
Founded [ INT ]
Affiliation [ TEXT ]
Enrollment [ INT ]
Nickname [ TEXT ]
Primary_conference [ TEXT ]

Please write me a SQL statement that answers the following question: What are the enrollment and primary conference for the university which was founded the earliest? [/INST]

Output: SELECT enrollment ,  primary_conference FROM university ORDER BY founded LIMIT 1;


Input:
[INST] Here is a database schema:
basketball_match :
Team_ID [ INT ] primary_key
School_ID [ INT ] basketball_match.School_ID = university.School_ID
Team_Name [ TEXT ]
ACC_Regular_Season [ TEXT ]
ACC_Percent [ TEXT ]
ACC_Home [ TEXT ]
ACC_Road [ TEXT ]
All_Games [ TEXT ]
All_Games_Percent [ INT ]
All_Home [ TEXT ]
All_Road [ TEXT ]
All_Neutral [ TEXT ]

university :
School_ID [ INT ] primary_key
School [ TEXT ]
Location [ TEXT ]
Founded [ INT ]
Affiliation [ TEXT ]
Enrollment [ INT ]
Nickname [ TEXT ]
Primary_conference [ TEXT ]

Please write me a SQL statement that answers the following question: What is the total and minimum enrollment of all schools? [/INST]

Output: SELECT sum(enrollment) ,  min(enrollment) FROM university;


Input:
[INST] Here is a database schema:
basketball_match :
Team_ID [ INT ] primary_key
School_ID [ INT ] basketball_match.School_ID = university.School_ID
Team_Name [ TEXT ]
ACC_Regular_Season [ TEXT ]
ACC_Percent [ TEXT ]
ACC_Home [ TEXT ]
ACC_Road [ TEXT ]
All_Games [ TEXT ]
All_Games_Percent [ INT ]
All_Home [ TEXT ]
All_Road [ TEXT ]
All_Neutral [ TEXT ]

university :
School_ID [ INT ] primary_key
School [ TEXT ]
Location [ TEXT ]
Founded [ INT ]
Affiliation [ TEXT ]
Enrollment [ INT ]
Nickname [ TEXT ]
Primary_conference [ TEXT ]

Please write me a SQL statement that answers the following question: Return the total and minimum enrollments across all schools. [/INST]

Output: SELECT sum(enrollment) ,  min(enrollment) FROM university;


Input:
[INST] Here is a database schema:
basketball_match :
Team_ID [ INT ] primary_key
School_ID [ INT ] basketball_match.School_ID = university.School_ID
Team_Name [ TEXT ]
ACC_Regular_Season [ TEXT ]
ACC_Percent [ TEXT ]
ACC_Home [ TEXT ]
ACC_Road [ TEXT ]
All_Games [ TEXT ]
All_Games_Percent [ INT ]
All_Home [ TEXT ]
All_Road [ TEXT ]
All_Neutral [ TEXT ]

university :
School_ID [ INT ] primary_key
School [ TEXT ]
Location [ TEXT ]
Founded [ INT ]
Affiliation [ TEXT ]
Enrollment [ INT ]
Nickname [ TEXT ]
Primary_conference [ TEXT ]

Please write me a SQL statement that answers the following question: Find the total student enrollment for different affiliation type schools. [/INST]

Output: SELECT sum(enrollment) ,  affiliation FROM university GROUP BY affiliation;


Input:
[INST] Here is a database schema:
basketball_match :
Team_ID [ INT ] primary_key
School_ID [ INT ] basketball_match.School_ID = university.School_ID
Team_Name [ TEXT ]
ACC_Regular_Season [ TEXT ]
ACC_Percent [ TEXT ]
ACC_Home [ TEXT ]
ACC_Road [ TEXT ]
All_Games [ TEXT ]
All_Games_Percent [ INT ]
All_Home [ TEXT ]
All_Road [ TEXT ]
All_Neutral [ TEXT ]

university :
School_ID [ INT ] primary_key
School [ TEXT ]
Location [ TEXT ]
Founded [ INT ]
Affiliation [ TEXT ]
Enrollment [ INT ]
Nickname [ TEXT ]
Primary_conference [ TEXT ]

Please write me a SQL statement that answers the following question: What are the total enrollments of universities of each affiliation type? [/INST]

Output: SELECT sum(enrollment) ,  affiliation FROM university GROUP BY affiliation;


Input:
[INST] Here is a database schema:
basketball_match :
Team_ID [ INT ] primary_key
School_ID [ INT ] basketball_match.School_ID = university.School_ID
Team_Name [ TEXT ]
ACC_Regular_Season [ TEXT ]
ACC_Percent [ TEXT ]
ACC_Home [ TEXT ]
ACC_Road [ TEXT ]
All_Games [ TEXT ]
All_Games_Percent [ INT ]
All_Home [ TEXT ]
All_Road [ TEXT ]
All_Neutral [ TEXT ]

university :
School_ID [ INT ] primary_key
School [ TEXT ]
Location [ TEXT ]
Founded [ INT ]
Affiliation [ TEXT ]
Enrollment [ INT ]
Nickname [ TEXT ]
Primary_conference [ TEXT ]

Please write me a SQL statement that answers the following question: How many schools do not participate in the basketball match? [/INST]

Output: SELECT count(*) FROM university WHERE school_id NOT IN (SELECT school_id FROM basketball_match);


Input:
[INST] Here is a database schema:
basketball_match :
Team_ID [ INT ] primary_key
School_ID [ INT ] basketball_match.School_ID = university.School_ID
Team_Name [ TEXT ]
ACC_Regular_Season [ TEXT ]
ACC_Percent [ TEXT ]
ACC_Home [ TEXT ]
ACC_Road [ TEXT ]
All_Games [ TEXT ]
All_Games_Percent [ INT ]
All_Home [ TEXT ]
All_Road [ TEXT ]
All_Neutral [ TEXT ]

university :
School_ID [ INT ] primary_key
School [ TEXT ]
Location [ TEXT ]
Founded [ INT ]
Affiliation [ TEXT ]
Enrollment [ INT ]
Nickname [ TEXT ]
Primary_conference [ TEXT ]

Please write me a SQL statement that answers the following question: Count the number of universities that do not participate in the baketball match. [/INST]

Output: SELECT count(*) FROM university WHERE school_id NOT IN (SELECT school_id FROM basketball_match);


Input:
[INST] Here is a database schema:
basketball_match :
Team_ID [ INT ] primary_key
School_ID [ INT ] basketball_match.School_ID = university.School_ID
Team_Name [ TEXT ]
ACC_Regular_Season [ TEXT ]
ACC_Percent [ TEXT ]
ACC_Home [ TEXT ]
ACC_Road [ TEXT ]
All_Games [ TEXT ]
All_Games_Percent [ INT ]
All_Home [ TEXT ]
All_Road [ TEXT ]
All_Neutral [ TEXT ]

university :
School_ID [ INT ] primary_key
School [ TEXT ]
Location [ TEXT ]
Founded [ INT ]
Affiliation [ TEXT ]
Enrollment [ INT ]
Nickname [ TEXT ]
Primary_conference [ TEXT ]

Please write me a SQL statement that answers the following question: Find the schools that were either founded after 1850 or public. [/INST]

Output: SELECT school FROM university WHERE founded  >  1850 OR affiliation  =  'Public';


Input:
[INST] Here is a database schema:
basketball_match :
Team_ID [ INT ] primary_key
School_ID [ INT ] basketball_match.School_ID = university.School_ID
Team_Name [ TEXT ]
ACC_Regular_Season [ TEXT ]
ACC_Percent [ TEXT ]
ACC_Home [ TEXT ]
ACC_Road [ TEXT ]
All_Games [ TEXT ]
All_Games_Percent [ INT ]
All_Home [ TEXT ]
All_Road [ TEXT ]
All_Neutral [ TEXT ]

university :
School_ID [ INT ] primary_key
School [ TEXT ]
Location [ TEXT ]
Founded [ INT ]
Affiliation [ TEXT ]
Enrollment [ INT ]
Nickname [ TEXT ]
Primary_conference [ TEXT ]

Please write me a SQL statement that answers the following question: What are the schools that were either founded before 1850 or are public? [/INST]

Output: SELECT school FROM university WHERE founded  >  1850 OR affiliation  =  'Public';


Input:
[INST] Here is a database schema:
basketball_match :
Team_ID [ INT ] primary_key
School_ID [ INT ] basketball_match.School_ID = university.School_ID
Team_Name [ TEXT ]
ACC_Regular_Season [ TEXT ]
ACC_Percent [ TEXT ]
ACC_Home [ TEXT ]
ACC_Road [ TEXT ]
All_Games [ TEXT ]
All_Games_Percent [ INT ]
All_Home [ TEXT ]
All_Road [ TEXT ]
All_Neutral [ TEXT ]

university :
School_ID [ INT ] primary_key
School [ TEXT ]
Location [ TEXT ]
Founded [ INT ]
Affiliation [ TEXT ]
Enrollment [ INT ]
Nickname [ TEXT ]
Primary_conference [ TEXT ]

Please write me a SQL statement that answers the following question: Find how many different affiliation types there are. [/INST]

Output: SELECT count(DISTINCT affiliation) FROM university;


Input:
[INST] Here is a database schema:
basketball_match :
Team_ID [ INT ] primary_key
School_ID [ INT ] basketball_match.School_ID = university.School_ID
Team_Name [ TEXT ]
ACC_Regular_Season [ TEXT ]
ACC_Percent [ TEXT ]
ACC_Home [ TEXT ]
ACC_Road [ TEXT ]
All_Games [ TEXT ]
All_Games_Percent [ INT ]
All_Home [ TEXT ]
All_Road [ TEXT ]
All_Neutral [ TEXT ]

university :
School_ID [ INT ] primary_key
School [ TEXT ]
Location [ TEXT ]
Founded [ INT ]
Affiliation [ TEXT ]
Enrollment [ INT ]
Nickname [ TEXT ]
Primary_conference [ TEXT ]

Please write me a SQL statement that answers the following question: Count the number of different affiliation types. [/INST]

Output: SELECT count(DISTINCT affiliation) FROM university;


Input:
[INST] Here is a database schema:
basketball_match :
Team_ID [ INT ] primary_key
School_ID [ INT ] basketball_match.School_ID = university.School_ID
Team_Name [ TEXT ]
ACC_Regular_Season [ TEXT ]
ACC_Percent [ TEXT ]
ACC_Home [ TEXT ]
ACC_Road [ TEXT ]
All_Games [ TEXT ]
All_Games_Percent [ INT ]
All_Home [ TEXT ]
All_Road [ TEXT ]
All_Neutral [ TEXT ]

university :
School_ID [ INT ] primary_key
School [ TEXT ]
Location [ TEXT ]
Founded [ INT ]
Affiliation [ TEXT ]
Enrollment [ INT ]
Nickname [ TEXT ]
Primary_conference [ TEXT ]

Please write me a SQL statement that answers the following question: Find how many school locations have the word 'NY'. [/INST]

Output: SELECT count(*) FROM university WHERE LOCATION LIKE "%NY%";


Input:
[INST] Here is a database schema:
basketball_match :
Team_ID [ INT ] primary_key
School_ID [ INT ] basketball_match.School_ID = university.School_ID
Team_Name [ TEXT ]
ACC_Regular_Season [ TEXT ]
ACC_Percent [ TEXT ]
ACC_Home [ TEXT ]
ACC_Road [ TEXT ]
All_Games [ TEXT ]
All_Games_Percent [ INT ]
All_Home [ TEXT ]
All_Road [ TEXT ]
All_Neutral [ TEXT ]

university :
School_ID [ INT ] primary_key
School [ TEXT ]
Location [ TEXT ]
Founded [ INT ]
Affiliation [ TEXT ]
Enrollment [ INT ]
Nickname [ TEXT ]
Primary_conference [ TEXT ]

Please write me a SQL statement that answers the following question: How many universities have a location that contains NY? [/INST]

Output: SELECT count(*) FROM university WHERE LOCATION LIKE "%NY%";


Input:
[INST] Here is a database schema:
basketball_match :
Team_ID [ INT ] primary_key
School_ID [ INT ] basketball_match.School_ID = university.School_ID
Team_Name [ TEXT ]
ACC_Regular_Season [ TEXT ]
ACC_Percent [ TEXT ]
ACC_Home [ TEXT ]
ACC_Road [ TEXT ]
All_Games [ TEXT ]
All_Games_Percent [ INT ]
All_Home [ TEXT ]
All_Road [ TEXT ]
All_Neutral [ TEXT ]

university :
School_ID [ INT ] primary_key
School [ TEXT ]
Location [ TEXT ]
Founded [ INT ]
Affiliation [ TEXT ]
Enrollment [ INT ]
Nickname [ TEXT ]
Primary_conference [ TEXT ]

Please write me a SQL statement that answers the following question: Find the team names of the universities whose enrollments are smaller than the average enrollment size. [/INST]

Output: SELECT t2.team_name FROM university AS t1 JOIN basketball_match AS t2 ON t1.school_id  =  t2.school_id WHERE enrollment  <  (SELECT avg(enrollment) FROM university);


Input:
[INST] Here is a database schema:
basketball_match :
Team_ID [ INT ] primary_key
School_ID [ INT ] basketball_match.School_ID = university.School_ID
Team_Name [ TEXT ]
ACC_Regular_Season [ TEXT ]
ACC_Percent [ TEXT ]
ACC_Home [ TEXT ]
ACC_Road [ TEXT ]
All_Games [ TEXT ]
All_Games_Percent [ INT ]
All_Home [ TEXT ]
All_Road [ TEXT ]
All_Neutral [ TEXT ]

university :
School_ID [ INT ] primary_key
School [ TEXT ]
Location [ TEXT ]
Founded [ INT ]
Affiliation [ TEXT ]
Enrollment [ INT ]
Nickname [ TEXT ]
Primary_conference [ TEXT ]

Please write me a SQL statement that answers the following question: What are the names of teams from universities that have a below average enrollment? [/INST]

Output: SELECT t2.team_name FROM university AS t1 JOIN basketball_match AS t2 ON t1.school_id  =  t2.school_id WHERE enrollment  <  (SELECT avg(enrollment) FROM university);


Input:
[INST] Here is a database schema:
basketball_match :
Team_ID [ INT ] primary_key
School_ID [ INT ] basketball_match.School_ID = university.School_ID
Team_Name [ TEXT ]
ACC_Regular_Season [ TEXT ]
ACC_Percent [ TEXT ]
ACC_Home [ TEXT ]
ACC_Road [ TEXT ]
All_Games [ TEXT ]
All_Games_Percent [ INT ]
All_Home [ TEXT ]
All_Road [ TEXT ]
All_Neutral [ TEXT ]

university :
School_ID [ INT ] primary_key
School [ TEXT ]
Location [ TEXT ]
Founded [ INT ]
Affiliation [ TEXT ]
Enrollment [ INT ]
Nickname [ TEXT ]
Primary_conference [ TEXT ]

Please write me a SQL statement that answers the following question: Find the number of universities that have over a 20000 enrollment size for each affiliation type. [/INST]

Output: SELECT count(*) ,  affiliation FROM university WHERE enrollment  >  20000 GROUP BY affiliation;


Input:
[INST] Here is a database schema:
basketball_match :
Team_ID [ INT ] primary_key
School_ID [ INT ] basketball_match.School_ID = university.School_ID
Team_Name [ TEXT ]
ACC_Regular_Season [ TEXT ]
ACC_Percent [ TEXT ]
ACC_Home [ TEXT ]
ACC_Road [ TEXT ]
All_Games [ TEXT ]
All_Games_Percent [ INT ]
All_Home [ TEXT ]
All_Road [ TEXT ]
All_Neutral [ TEXT ]

university :
School_ID [ INT ] primary_key
School [ TEXT ]
Location [ TEXT ]
Founded [ INT ]
Affiliation [ TEXT ]
Enrollment [ INT ]
Nickname [ TEXT ]
Primary_conference [ TEXT ]

Please write me a SQL statement that answers the following question: What are the different affiliations, and how many schools with each have an enrollment size of above 20000? [/INST]

Output: SELECT count(*) ,  affiliation FROM university WHERE enrollment  >  20000 GROUP BY affiliation;


Input:
[INST] Here is a database schema:
basketball_match :
Team_ID [ INT ] primary_key
School_ID [ INT ] basketball_match.School_ID = university.School_ID
Team_Name [ TEXT ]
ACC_Regular_Season [ TEXT ]
ACC_Percent [ TEXT ]
ACC_Home [ TEXT ]
ACC_Road [ TEXT ]
All_Games [ TEXT ]
All_Games_Percent [ INT ]
All_Home [ TEXT ]
All_Road [ TEXT ]
All_Neutral [ TEXT ]

university :
School_ID [ INT ] primary_key
School [ TEXT ]
Location [ TEXT ]
Founded [ INT ]
Affiliation [ TEXT ]
Enrollment [ INT ]
Nickname [ TEXT ]
Primary_conference [ TEXT ]

Please write me a SQL statement that answers the following question: Find the total number of students enrolled in the colleges that were founded after the year of 1850 for each affiliation type. [/INST]

Output: SELECT sum(Enrollment) ,  affiliation FROM university WHERE founded  >  1850 GROUP BY affiliation;


Input:
[INST] Here is a database schema:
basketball_match :
Team_ID [ INT ] primary_key
School_ID [ INT ] basketball_match.School_ID = university.School_ID
Team_Name [ TEXT ]
ACC_Regular_Season [ TEXT ]
ACC_Percent [ TEXT ]
ACC_Home [ TEXT ]
ACC_Road [ TEXT ]
All_Games [ TEXT ]
All_Games_Percent [ INT ]
All_Home [ TEXT ]
All_Road [ TEXT ]
All_Neutral [ TEXT ]

university :
School_ID [ INT ] primary_key
School [ TEXT ]
Location [ TEXT ]
Founded [ INT ]
Affiliation [ TEXT ]
Enrollment [ INT ]
Nickname [ TEXT ]
Primary_conference [ TEXT ]

Please write me a SQL statement that answers the following question: What are the different affiliations, and what is the total enrollment of schools founded after 1850 for each enrollment type? [/INST]

Output: SELECT sum(Enrollment) ,  affiliation FROM university WHERE founded  >  1850 GROUP BY affiliation;


Input:
[INST] Here is a database schema:
basketball_match :
Team_ID [ INT ] primary_key
School_ID [ INT ] basketball_match.School_ID = university.School_ID
Team_Name [ TEXT ]
ACC_Regular_Season [ TEXT ]
ACC_Percent [ TEXT ]
ACC_Home [ TEXT ]
ACC_Road [ TEXT ]
All_Games [ TEXT ]
All_Games_Percent [ INT ]
All_Home [ TEXT ]
All_Road [ TEXT ]
All_Neutral [ TEXT ]

university :
School_ID [ INT ] primary_key
School [ TEXT ]
Location [ TEXT ]
Founded [ INT ]
Affiliation [ TEXT ]
Enrollment [ INT ]
Nickname [ TEXT ]
Primary_conference [ TEXT ]

Please write me a SQL statement that answers the following question: What is the maximum enrollment across all schools? [/INST]

Output: SELECT max(Enrollment) FROM university;


Input:
[INST] Here is a database schema:
basketball_match :
Team_ID [ INT ] primary_key
School_ID [ INT ] basketball_match.School_ID = university.School_ID
Team_Name [ TEXT ]
ACC_Regular_Season [ TEXT ]
ACC_Percent [ TEXT ]
ACC_Home [ TEXT ]
ACC_Road [ TEXT ]
All_Games [ TEXT ]
All_Games_Percent [ INT ]
All_Home [ TEXT ]
All_Road [ TEXT ]
All_Neutral [ TEXT ]

university :
School_ID [ INT ] primary_key
School [ TEXT ]
Location [ TEXT ]
Founded [ INT ]
Affiliation [ TEXT ]
Enrollment [ INT ]
Nickname [ TEXT ]
Primary_conference [ TEXT ]

Please write me a SQL statement that answers the following question: Return the maximum enrollment across all schools. [/INST]

Output: SELECT max(Enrollment) FROM university;


Input:
[INST] Here is a database schema:
basketball_match :
Team_ID [ INT ] primary_key
School_ID [ INT ] basketball_match.School_ID = university.School_ID
Team_Name [ TEXT ]
ACC_Regular_Season [ TEXT ]
ACC_Percent [ TEXT ]
ACC_Home [ TEXT ]
ACC_Road [ TEXT ]
All_Games [ TEXT ]
All_Games_Percent [ INT ]
All_Home [ TEXT ]
All_Road [ TEXT ]
All_Neutral [ TEXT ]

university :
School_ID [ INT ] primary_key
School [ TEXT ]
Location [ TEXT ]
Founded [ INT ]
Affiliation [ TEXT ]
Enrollment [ INT ]
Nickname [ TEXT ]
Primary_conference [ TEXT ]

Please write me a SQL statement that answers the following question: List all information regarding the basketball match. [/INST]

Output: SELECT * FROM basketball_match;


Input:
[INST] Here is a database schema:
basketball_match :
Team_ID [ INT ] primary_key
School_ID [ INT ] basketball_match.School_ID = university.School_ID
Team_Name [ TEXT ]
ACC_Regular_Season [ TEXT ]
ACC_Percent [ TEXT ]
ACC_Home [ TEXT ]
ACC_Road [ TEXT ]
All_Games [ TEXT ]
All_Games_Percent [ INT ]
All_Home [ TEXT ]
All_Road [ TEXT ]
All_Neutral [ TEXT ]

university :
School_ID [ INT ] primary_key
School [ TEXT ]
Location [ TEXT ]
Founded [ INT ]
Affiliation [ TEXT ]
Enrollment [ INT ]
Nickname [ TEXT ]
Primary_conference [ TEXT ]

Please write me a SQL statement that answers the following question: What is all the information about the basketball match? [/INST]

Output: SELECT * FROM basketball_match;


Input:
[INST] Here is a database schema:
basketball_match :
Team_ID [ INT ] primary_key
School_ID [ INT ] basketball_match.School_ID = university.School_ID
Team_Name [ TEXT ]
ACC_Regular_Season [ TEXT ]
ACC_Percent [ TEXT ]
ACC_Home [ TEXT ]
ACC_Road [ TEXT ]
All_Games [ TEXT ]
All_Games_Percent [ INT ]
All_Home [ TEXT ]
All_Road [ TEXT ]
All_Neutral [ TEXT ]

university :
School_ID [ INT ] primary_key
School [ TEXT ]
Location [ TEXT ]
Founded [ INT ]
Affiliation [ TEXT ]
Enrollment [ INT ]
Nickname [ TEXT ]
Primary_conference [ TEXT ]

Please write me a SQL statement that answers the following question: List names of all teams in the basketball competition, ordered by all home scores in descending order. [/INST]

Output: SELECT team_name FROM basketball_match ORDER BY All_Home DESC;


Input:
[INST] Here is a database schema:
basketball_match :
Team_ID [ INT ] primary_key
School_ID [ INT ] basketball_match.School_ID = university.School_ID
Team_Name [ TEXT ]
ACC_Regular_Season [ TEXT ]
ACC_Percent [ TEXT ]
ACC_Home [ TEXT ]
ACC_Road [ TEXT ]
All_Games [ TEXT ]
All_Games_Percent [ INT ]
All_Home [ TEXT ]
All_Road [ TEXT ]
All_Neutral [ TEXT ]

university :
School_ID [ INT ] primary_key
School [ TEXT ]
Location [ TEXT ]
Founded [ INT ]
Affiliation [ TEXT ]
Enrollment [ INT ]
Nickname [ TEXT ]
Primary_conference [ TEXT ]

Please write me a SQL statement that answers the following question: What are the names of all the teams in the basketball competition, sorted by all home scores in descending order? [/INST]

Output: SELECT team_name FROM basketball_match ORDER BY All_Home DESC;


Input:
[INST] Here is a database schema:
chip_model :
Model_name [ TEXT ] primary_key
Launch_year [ INT ]
RAM_MiB [ INT ]
ROM_MiB [ INT ]
Slots [ TEXT ]
WiFi [ TEXT ]
Bluetooth [ TEXT ]

screen_mode :
Graphics_mode [ INT ] primary_key
Char_cells [ TEXT ]
Pixels [ TEXT ]
Hardware_colours [ INT ]
used_kb [ INT ]
map [ TEXT ]
Type [ TEXT ]

phone :
Company_name [ TEXT ]
Hardware_Model_name [ TEXT ] primary_key
Accreditation_type [ TEXT ]
Accreditation_level [ TEXT ]
Date [ TEXT ]
chip_model [ TEXT ] phone.chip_model = chip_model.Model_name
screen_mode [ TEXT ] phone.screen_mode = screen_mode.Graphics_mode

Please write me a SQL statement that answers the following question: the names of models that launched between 2002 and 2004. [/INST]

Output: SELECT Model_name FROM chip_model WHERE Launch_year BETWEEN 2002 AND 2004;


Input:
[INST] Here is a database schema:
chip_model :
Model_name [ TEXT ] primary_key
Launch_year [ INT ]
RAM_MiB [ INT ]
ROM_MiB [ INT ]
Slots [ TEXT ]
WiFi [ TEXT ]
Bluetooth [ TEXT ]

screen_mode :
Graphics_mode [ INT ] primary_key
Char_cells [ TEXT ]
Pixels [ TEXT ]
Hardware_colours [ INT ]
used_kb [ INT ]
map [ TEXT ]
Type [ TEXT ]

phone :
Company_name [ TEXT ]
Hardware_Model_name [ TEXT ] primary_key
Accreditation_type [ TEXT ]
Accreditation_level [ TEXT ]
Date [ TEXT ]
chip_model [ TEXT ] phone.chip_model = chip_model.Model_name
screen_mode [ TEXT ] phone.screen_mode = screen_mode.Graphics_mode

Please write me a SQL statement that answers the following question: Which model has the least amount of RAM? List the model name and the amount of RAM. [/INST]

Output: SELECT Model_name ,  RAM_MiB FROM chip_model ORDER BY RAM_MiB ASC LIMIT 1;


Input:
[INST] Here is a database schema:
chip_model :
Model_name [ TEXT ] primary_key
Launch_year [ INT ]
RAM_MiB [ INT ]
ROM_MiB [ INT ]
Slots [ TEXT ]
WiFi [ TEXT ]
Bluetooth [ TEXT ]

screen_mode :
Graphics_mode [ INT ] primary_key
Char_cells [ TEXT ]
Pixels [ TEXT ]
Hardware_colours [ INT ]
used_kb [ INT ]
map [ TEXT ]
Type [ TEXT ]

phone :
Company_name [ TEXT ]
Hardware_Model_name [ TEXT ] primary_key
Accreditation_type [ TEXT ]
Accreditation_level [ TEXT ]
Date [ TEXT ]
chip_model [ TEXT ] phone.chip_model = chip_model.Model_name
screen_mode [ TEXT ] phone.screen_mode = screen_mode.Graphics_mode

Please write me a SQL statement that answers the following question: What are the chip model and screen mode of the phone with hardware model name "LG-P760"? [/INST]

Output: SELECT chip_model ,  screen_mode FROM phone WHERE Hardware_Model_name = "LG-P760";


Input:
[INST] Here is a database schema:
chip_model :
Model_name [ TEXT ] primary_key
Launch_year [ INT ]
RAM_MiB [ INT ]
ROM_MiB [ INT ]
Slots [ TEXT ]
WiFi [ TEXT ]
Bluetooth [ TEXT ]

screen_mode :
Graphics_mode [ INT ] primary_key
Char_cells [ TEXT ]
Pixels [ TEXT ]
Hardware_colours [ INT ]
used_kb [ INT ]
map [ TEXT ]
Type [ TEXT ]

phone :
Company_name [ TEXT ]
Hardware_Model_name [ TEXT ] primary_key
Accreditation_type [ TEXT ]
Accreditation_level [ TEXT ]
Date [ TEXT ]
chip_model [ TEXT ] phone.chip_model = chip_model.Model_name
screen_mode [ TEXT ] phone.screen_mode = screen_mode.Graphics_mode

Please write me a SQL statement that answers the following question: How many phone hardware models are produced by the company named "Nokia Corporation"? [/INST]

Output: SELECT count(*) FROM phone WHERE Company_name = "Nokia Corporation";


Input:
[INST] Here is a database schema:
chip_model :
Model_name [ TEXT ] primary_key
Launch_year [ INT ]
RAM_MiB [ INT ]
ROM_MiB [ INT ]
Slots [ TEXT ]
WiFi [ TEXT ]
Bluetooth [ TEXT ]

screen_mode :
Graphics_mode [ INT ] primary_key
Char_cells [ TEXT ]
Pixels [ TEXT ]
Hardware_colours [ INT ]
used_kb [ INT ]
map [ TEXT ]
Type [ TEXT ]

phone :
Company_name [ TEXT ]
Hardware_Model_name [ TEXT ] primary_key
Accreditation_type [ TEXT ]
Accreditation_level [ TEXT ]
Date [ TEXT ]
chip_model [ TEXT ] phone.chip_model = chip_model.Model_name
screen_mode [ TEXT ] phone.screen_mode = screen_mode.Graphics_mode

Please write me a SQL statement that answers the following question: What is maximum and minimum RAM size of phone produced by company named "Nokia Corporation"? [/INST]

Output: SELECT max(T1.RAM_MiB) ,  min(T1.RAM_MiB) FROM chip_model AS T1 JOIN phone AS T2 ON T1.Model_name  =  T2.chip_model WHERE T2.Company_name = "Nokia Corporation";


Input:
[INST] Here is a database schema:
chip_model :
Model_name [ TEXT ] primary_key
Launch_year [ INT ]
RAM_MiB [ INT ]
ROM_MiB [ INT ]
Slots [ TEXT ]
WiFi [ TEXT ]
Bluetooth [ TEXT ]

screen_mode :
Graphics_mode [ INT ] primary_key
Char_cells [ TEXT ]
Pixels [ TEXT ]
Hardware_colours [ INT ]
used_kb [ INT ]
map [ TEXT ]
Type [ TEXT ]

phone :
Company_name [ TEXT ]
Hardware_Model_name [ TEXT ] primary_key
Accreditation_type [ TEXT ]
Accreditation_level [ TEXT ]
Date [ TEXT ]
chip_model [ TEXT ] phone.chip_model = chip_model.Model_name
screen_mode [ TEXT ] phone.screen_mode = screen_mode.Graphics_mode

Please write me a SQL statement that answers the following question: What is the average ROM size of phones produced by the company named "Nokia Corporation"? [/INST]

Output: SELECT avg(T1.ROM_MiB) FROM chip_model AS T1 JOIN phone AS T2 ON T1.Model_name  =  T2.chip_model WHERE T2.Company_name = "Nokia Corporation";


Input:
[INST] Here is a database schema:
chip_model :
Model_name [ TEXT ] primary_key
Launch_year [ INT ]
RAM_MiB [ INT ]
ROM_MiB [ INT ]
Slots [ TEXT ]
WiFi [ TEXT ]
Bluetooth [ TEXT ]

screen_mode :
Graphics_mode [ INT ] primary_key
Char_cells [ TEXT ]
Pixels [ TEXT ]
Hardware_colours [ INT ]
used_kb [ INT ]
map [ TEXT ]
Type [ TEXT ]

phone :
Company_name [ TEXT ]
Hardware_Model_name [ TEXT ] primary_key
Accreditation_type [ TEXT ]
Accreditation_level [ TEXT ]
Date [ TEXT ]
chip_model [ TEXT ] phone.chip_model = chip_model.Model_name
screen_mode [ TEXT ] phone.screen_mode = screen_mode.Graphics_mode

Please write me a SQL statement that answers the following question: List the hardware model name and company name for all the phones that were launched in year 2002 or have RAM size greater than 32. [/INST]

Output: SELECT T2.Hardware_Model_name ,  T2.Company_name FROM chip_model AS T1 JOIN phone AS T2 ON T1.Model_name  =  T2.chip_model WHERE T1.Launch_year = 2002 OR T1.RAM_MiB  >  32;


Input:
[INST] Here is a database schema:
chip_model :
Model_name [ TEXT ] primary_key
Launch_year [ INT ]
RAM_MiB [ INT ]
ROM_MiB [ INT ]
Slots [ TEXT ]
WiFi [ TEXT ]
Bluetooth [ TEXT ]

screen_mode :
Graphics_mode [ INT ] primary_key
Char_cells [ TEXT ]
Pixels [ TEXT ]
Hardware_colours [ INT ]
used_kb [ INT ]
map [ TEXT ]
Type [ TEXT ]

phone :
Company_name [ TEXT ]
Hardware_Model_name [ TEXT ] primary_key
Accreditation_type [ TEXT ]
Accreditation_level [ TEXT ]
Date [ TEXT ]
chip_model [ TEXT ] phone.chip_model = chip_model.Model_name
screen_mode [ TEXT ] phone.screen_mode = screen_mode.Graphics_mode

Please write me a SQL statement that answers the following question: Find all phones that have word 'Full' in their accreditation types. List the Hardware Model name and Company name. [/INST]

Output: SELECT Hardware_Model_name ,  Company_name FROM phone WHERE Accreditation_type LIKE 'Full';


Input:
[INST] Here is a database schema:
chip_model :
Model_name [ TEXT ] primary_key
Launch_year [ INT ]
RAM_MiB [ INT ]
ROM_MiB [ INT ]
Slots [ TEXT ]
WiFi [ TEXT ]
Bluetooth [ TEXT ]

screen_mode :
Graphics_mode [ INT ] primary_key
Char_cells [ TEXT ]
Pixels [ TEXT ]
Hardware_colours [ INT ]
used_kb [ INT ]
map [ TEXT ]
Type [ TEXT ]

phone :
Company_name [ TEXT ]
Hardware_Model_name [ TEXT ] primary_key
Accreditation_type [ TEXT ]
Accreditation_level [ TEXT ]
Date [ TEXT ]
chip_model [ TEXT ] phone.chip_model = chip_model.Model_name
screen_mode [ TEXT ] phone.screen_mode = screen_mode.Graphics_mode

Please write me a SQL statement that answers the following question: Find the Char cells, Pixels and Hardware colours for the screen of the phone whose hardware model name is "LG-P760". [/INST]

Output: SELECT T1.Char_cells ,  T1.Pixels ,  T1.Hardware_colours FROM screen_mode AS T1 JOIN phone AS T2 ON T1.Graphics_mode = T2.screen_mode WHERE T2.Hardware_Model_name = "LG-P760";


Input:
[INST] Here is a database schema:
chip_model :
Model_name [ TEXT ] primary_key
Launch_year [ INT ]
RAM_MiB [ INT ]
ROM_MiB [ INT ]
Slots [ TEXT ]
WiFi [ TEXT ]
Bluetooth [ TEXT ]

screen_mode :
Graphics_mode [ INT ] primary_key
Char_cells [ TEXT ]
Pixels [ TEXT ]
Hardware_colours [ INT ]
used_kb [ INT ]
map [ TEXT ]
Type [ TEXT ]

phone :
Company_name [ TEXT ]
Hardware_Model_name [ TEXT ] primary_key
Accreditation_type [ TEXT ]
Accreditation_level [ TEXT ]
Date [ TEXT ]
chip_model [ TEXT ] phone.chip_model = chip_model.Model_name
screen_mode [ TEXT ] phone.screen_mode = screen_mode.Graphics_mode

Please write me a SQL statement that answers the following question: List the hardware model name and company name for the phone whose screen mode type is "Graphics." [/INST]

Output: SELECT T2.Hardware_Model_name ,  T2.Company_name FROM screen_mode AS T1 JOIN phone AS T2 ON T1.Graphics_mode = T2.screen_mode WHERE T1.Type  =  "Graphics";


Input:
[INST] Here is a database schema:
chip_model :
Model_name [ TEXT ] primary_key
Launch_year [ INT ]
RAM_MiB [ INT ]
ROM_MiB [ INT ]
Slots [ TEXT ]
WiFi [ TEXT ]
Bluetooth [ TEXT ]

screen_mode :
Graphics_mode [ INT ] primary_key
Char_cells [ TEXT ]
Pixels [ TEXT ]
Hardware_colours [ INT ]
used_kb [ INT ]
map [ TEXT ]
Type [ TEXT ]

phone :
Company_name [ TEXT ]
Hardware_Model_name [ TEXT ] primary_key
Accreditation_type [ TEXT ]
Accreditation_level [ TEXT ]
Date [ TEXT ]
chip_model [ TEXT ] phone.chip_model = chip_model.Model_name
screen_mode [ TEXT ] phone.screen_mode = screen_mode.Graphics_mode

Please write me a SQL statement that answers the following question: Find the name of the company that has the least number of phone models. List the company name and the number of phone model produced by that company. [/INST]

Output: SELECT Company_name ,  count(*) FROM phone GROUP BY Company_name ORDER BY count(*) ASC LIMIT 1;


Input:
[INST] Here is a database schema:
chip_model :
Model_name [ TEXT ] primary_key
Launch_year [ INT ]
RAM_MiB [ INT ]
ROM_MiB [ INT ]
Slots [ TEXT ]
WiFi [ TEXT ]
Bluetooth [ TEXT ]

screen_mode :
Graphics_mode [ INT ] primary_key
Char_cells [ TEXT ]
Pixels [ TEXT ]
Hardware_colours [ INT ]
used_kb [ INT ]
map [ TEXT ]
Type [ TEXT ]

phone :
Company_name [ TEXT ]
Hardware_Model_name [ TEXT ] primary_key
Accreditation_type [ TEXT ]
Accreditation_level [ TEXT ]
Date [ TEXT ]
chip_model [ TEXT ] phone.chip_model = chip_model.Model_name
screen_mode [ TEXT ] phone.screen_mode = screen_mode.Graphics_mode

Please write me a SQL statement that answers the following question: List the name of the company that produced more than one phone model. [/INST]

Output: SELECT Company_name FROM phone GROUP BY Company_name HAVING count(*)  >  1;


Input:
[INST] Here is a database schema:
chip_model :
Model_name [ TEXT ] primary_key
Launch_year [ INT ]
RAM_MiB [ INT ]
ROM_MiB [ INT ]
Slots [ TEXT ]
WiFi [ TEXT ]
Bluetooth [ TEXT ]

screen_mode :
Graphics_mode [ INT ] primary_key
Char_cells [ TEXT ]
Pixels [ TEXT ]
Hardware_colours [ INT ]
used_kb [ INT ]
map [ TEXT ]
Type [ TEXT ]

phone :
Company_name [ TEXT ]
Hardware_Model_name [ TEXT ] primary_key
Accreditation_type [ TEXT ]
Accreditation_level [ TEXT ]
Date [ TEXT ]
chip_model [ TEXT ] phone.chip_model = chip_model.Model_name
screen_mode [ TEXT ] phone.screen_mode = screen_mode.Graphics_mode

Please write me a SQL statement that answers the following question: List the maximum, minimum and average number of used kb in screen mode. [/INST]

Output: SELECT max(used_kb) , min(used_kb) , avg(used_kb) FROM screen_mode;


Input:
[INST] Here is a database schema:
chip_model :
Model_name [ TEXT ] primary_key
Launch_year [ INT ]
RAM_MiB [ INT ]
ROM_MiB [ INT ]
Slots [ TEXT ]
WiFi [ TEXT ]
Bluetooth [ TEXT ]

screen_mode :
Graphics_mode [ INT ] primary_key
Char_cells [ TEXT ]
Pixels [ TEXT ]
Hardware_colours [ INT ]
used_kb [ INT ]
map [ TEXT ]
Type [ TEXT ]

phone :
Company_name [ TEXT ]
Hardware_Model_name [ TEXT ] primary_key
Accreditation_type [ TEXT ]
Accreditation_level [ TEXT ]
Date [ TEXT ]
chip_model [ TEXT ] phone.chip_model = chip_model.Model_name
screen_mode [ TEXT ] phone.screen_mode = screen_mode.Graphics_mode

Please write me a SQL statement that answers the following question: List the name of the phone model launched in year 2002 and with the highest RAM size. [/INST]

Output: SELECT T2.Hardware_Model_name FROM chip_model AS T1 JOIN phone AS T2 ON T1.Model_name  =  T2.chip_model WHERE T1.Launch_year = 2002 ORDER BY T1.RAM_MiB DESC LIMIT 1;


Input:
[INST] Here is a database schema:
chip_model :
Model_name [ TEXT ] primary_key
Launch_year [ INT ]
RAM_MiB [ INT ]
ROM_MiB [ INT ]
Slots [ TEXT ]
WiFi [ TEXT ]
Bluetooth [ TEXT ]

screen_mode :
Graphics_mode [ INT ] primary_key
Char_cells [ TEXT ]
Pixels [ TEXT ]
Hardware_colours [ INT ]
used_kb [ INT ]
map [ TEXT ]
Type [ TEXT ]

phone :
Company_name [ TEXT ]
Hardware_Model_name [ TEXT ] primary_key
Accreditation_type [ TEXT ]
Accreditation_level [ TEXT ]
Date [ TEXT ]
chip_model [ TEXT ] phone.chip_model = chip_model.Model_name
screen_mode [ TEXT ] phone.screen_mode = screen_mode.Graphics_mode

Please write me a SQL statement that answers the following question: What are the wifi and screen mode type of the hardware model named "LG-P760"? [/INST]

Output: SELECT T1.WiFi , T3.Type FROM chip_model AS T1 JOIN phone AS T2 ON T1.Model_name  =  T2.chip_model JOIN screen_mode AS T3 ON T2.screen_mode = T3.Graphics_mode WHERE T2.Hardware_Model_name = "LG-P760";


Input:
[INST] Here is a database schema:
chip_model :
Model_name [ TEXT ] primary_key
Launch_year [ INT ]
RAM_MiB [ INT ]
ROM_MiB [ INT ]
Slots [ TEXT ]
WiFi [ TEXT ]
Bluetooth [ TEXT ]

screen_mode :
Graphics_mode [ INT ] primary_key
Char_cells [ TEXT ]
Pixels [ TEXT ]
Hardware_colours [ INT ]
used_kb [ INT ]
map [ TEXT ]
Type [ TEXT ]

phone :
Company_name [ TEXT ]
Hardware_Model_name [ TEXT ] primary_key
Accreditation_type [ TEXT ]
Accreditation_level [ TEXT ]
Date [ TEXT ]
chip_model [ TEXT ] phone.chip_model = chip_model.Model_name
screen_mode [ TEXT ] phone.screen_mode = screen_mode.Graphics_mode

Please write me a SQL statement that answers the following question: List the hardware model name for the phones that have screen mode type "Text" or RAM size greater than 32. [/INST]

Output: SELECT T2.Hardware_Model_name FROM chip_model AS T1 JOIN phone AS T2 ON T1.Model_name  =  T2.chip_model JOIN screen_mode AS T3 ON T2.screen_mode = T3.Graphics_mode WHERE T3.Type = "Text" OR T1.RAM_MiB  >  32;


Input:
[INST] Here is a database schema:
chip_model :
Model_name [ TEXT ] primary_key
Launch_year [ INT ]
RAM_MiB [ INT ]
ROM_MiB [ INT ]
Slots [ TEXT ]
WiFi [ TEXT ]
Bluetooth [ TEXT ]

screen_mode :
Graphics_mode [ INT ] primary_key
Char_cells [ TEXT ]
Pixels [ TEXT ]
Hardware_colours [ INT ]
used_kb [ INT ]
map [ TEXT ]
Type [ TEXT ]

phone :
Company_name [ TEXT ]
Hardware_Model_name [ TEXT ] primary_key
Accreditation_type [ TEXT ]
Accreditation_level [ TEXT ]
Date [ TEXT ]
chip_model [ TEXT ] phone.chip_model = chip_model.Model_name
screen_mode [ TEXT ] phone.screen_mode = screen_mode.Graphics_mode

Please write me a SQL statement that answers the following question: List the hardware model name for the phones that were produced by "Nokia Corporation" or whose screen mode type is "Graphics." [/INST]

Output: SELECT DISTINCT T2.Hardware_Model_name FROM screen_mode AS T1 JOIN phone AS T2 ON T1.Graphics_mode = T2.screen_mode WHERE T1.Type  =  "Graphics" OR t2.Company_name  =  "Nokia Corporation";


Input:
[INST] Here is a database schema:
chip_model :
Model_name [ TEXT ] primary_key
Launch_year [ INT ]
RAM_MiB [ INT ]
ROM_MiB [ INT ]
Slots [ TEXT ]
WiFi [ TEXT ]
Bluetooth [ TEXT ]

screen_mode :
Graphics_mode [ INT ] primary_key
Char_cells [ TEXT ]
Pixels [ TEXT ]
Hardware_colours [ INT ]
used_kb [ INT ]
map [ TEXT ]
Type [ TEXT ]

phone :
Company_name [ TEXT ]
Hardware_Model_name [ TEXT ] primary_key
Accreditation_type [ TEXT ]
Accreditation_level [ TEXT ]
Date [ TEXT ]
chip_model [ TEXT ] phone.chip_model = chip_model.Model_name
screen_mode [ TEXT ] phone.screen_mode = screen_mode.Graphics_mode

Please write me a SQL statement that answers the following question: List the hardware model name for the phons that were produced by "Nokia Corporation" but whose screen mode type is not Text. [/INST]

Output: SELECT DISTINCT T2.Hardware_Model_name FROM screen_mode AS T1 JOIN phone AS T2 ON T1.Graphics_mode = T2.screen_mode WHERE t2.Company_name  =  "Nokia Corporation" AND T1.Type != "Text";


Input:
[INST] Here is a database schema:
chip_model :
Model_name [ TEXT ] primary_key
Launch_year [ INT ]
RAM_MiB [ INT ]
ROM_MiB [ INT ]
Slots [ TEXT ]
WiFi [ TEXT ]
Bluetooth [ TEXT ]

screen_mode :
Graphics_mode [ INT ] primary_key
Char_cells [ TEXT ]
Pixels [ TEXT ]
Hardware_colours [ INT ]
used_kb [ INT ]
map [ TEXT ]
Type [ TEXT ]

phone :
Company_name [ TEXT ]
Hardware_Model_name [ TEXT ] primary_key
Accreditation_type [ TEXT ]
Accreditation_level [ TEXT ]
Date [ TEXT ]
chip_model [ TEXT ] phone.chip_model = chip_model.Model_name
screen_mode [ TEXT ] phone.screen_mode = screen_mode.Graphics_mode

Please write me a SQL statement that answers the following question: List the phone hardware model and company name for the phones whose screen usage in kb is between 10 and 15. [/INST]

Output: SELECT DISTINCT T2.Hardware_Model_name , T2.Company_name FROM screen_mode AS T1 JOIN phone AS T2 ON T1.Graphics_mode = T2.screen_mode WHERE T1.used_kb BETWEEN 10 AND 15;


Input:
[INST] Here is a database schema:
chip_model :
Model_name [ TEXT ] primary_key
Launch_year [ INT ]
RAM_MiB [ INT ]
ROM_MiB [ INT ]
Slots [ TEXT ]
WiFi [ TEXT ]
Bluetooth [ TEXT ]

screen_mode :
Graphics_mode [ INT ] primary_key
Char_cells [ TEXT ]
Pixels [ TEXT ]
Hardware_colours [ INT ]
used_kb [ INT ]
map [ TEXT ]
Type [ TEXT ]

phone :
Company_name [ TEXT ]
Hardware_Model_name [ TEXT ] primary_key
Accreditation_type [ TEXT ]
Accreditation_level [ TEXT ]
Date [ TEXT ]
chip_model [ TEXT ] phone.chip_model = chip_model.Model_name
screen_mode [ TEXT ] phone.screen_mode = screen_mode.Graphics_mode

Please write me a SQL statement that answers the following question: Find the number of phones for each accreditation type. [/INST]

Output: SELECT Accreditation_type ,  count(*) FROM phone GROUP BY Accreditation_type;


Input:
[INST] Here is a database schema:
chip_model :
Model_name [ TEXT ] primary_key
Launch_year [ INT ]
RAM_MiB [ INT ]
ROM_MiB [ INT ]
Slots [ TEXT ]
WiFi [ TEXT ]
Bluetooth [ TEXT ]

screen_mode :
Graphics_mode [ INT ] primary_key
Char_cells [ TEXT ]
Pixels [ TEXT ]
Hardware_colours [ INT ]
used_kb [ INT ]
map [ TEXT ]
Type [ TEXT ]

phone :
Company_name [ TEXT ]
Hardware_Model_name [ TEXT ] primary_key
Accreditation_type [ TEXT ]
Accreditation_level [ TEXT ]
Date [ TEXT ]
chip_model [ TEXT ] phone.chip_model = chip_model.Model_name
screen_mode [ TEXT ] phone.screen_mode = screen_mode.Graphics_mode

Please write me a SQL statement that answers the following question: How many phones belongs to each accreditation type? [/INST]

Output: SELECT Accreditation_type ,  count(*) FROM phone GROUP BY Accreditation_type;


Input:
[INST] Here is a database schema:
chip_model :
Model_name [ TEXT ] primary_key
Launch_year [ INT ]
RAM_MiB [ INT ]
ROM_MiB [ INT ]
Slots [ TEXT ]
WiFi [ TEXT ]
Bluetooth [ TEXT ]

screen_mode :
Graphics_mode [ INT ] primary_key
Char_cells [ TEXT ]
Pixels [ TEXT ]
Hardware_colours [ INT ]
used_kb [ INT ]
map [ TEXT ]
Type [ TEXT ]

phone :
Company_name [ TEXT ]
Hardware_Model_name [ TEXT ] primary_key
Accreditation_type [ TEXT ]
Accreditation_level [ TEXT ]
Date [ TEXT ]
chip_model [ TEXT ] phone.chip_model = chip_model.Model_name
screen_mode [ TEXT ] phone.screen_mode = screen_mode.Graphics_mode

Please write me a SQL statement that answers the following question: Find the accreditation level that more than 3 phones use. [/INST]

Output: SELECT Accreditation_level FROM phone GROUP BY Accreditation_level HAVING count(*)  >  3;


Input:
[INST] Here is a database schema:
chip_model :
Model_name [ TEXT ] primary_key
Launch_year [ INT ]
RAM_MiB [ INT ]
ROM_MiB [ INT ]
Slots [ TEXT ]
WiFi [ TEXT ]
Bluetooth [ TEXT ]

screen_mode :
Graphics_mode [ INT ] primary_key
Char_cells [ TEXT ]
Pixels [ TEXT ]
Hardware_colours [ INT ]
used_kb [ INT ]
map [ TEXT ]
Type [ TEXT ]

phone :
Company_name [ TEXT ]
Hardware_Model_name [ TEXT ] primary_key
Accreditation_type [ TEXT ]
Accreditation_level [ TEXT ]
Date [ TEXT ]
chip_model [ TEXT ] phone.chip_model = chip_model.Model_name
screen_mode [ TEXT ] phone.screen_mode = screen_mode.Graphics_mode

Please write me a SQL statement that answers the following question: Find the details for all chip models. [/INST]

Output: SELECT * FROM chip_model;


Input:
[INST] Here is a database schema:
chip_model :
Model_name [ TEXT ] primary_key
Launch_year [ INT ]
RAM_MiB [ INT ]
ROM_MiB [ INT ]
Slots [ TEXT ]
WiFi [ TEXT ]
Bluetooth [ TEXT ]

screen_mode :
Graphics_mode [ INT ] primary_key
Char_cells [ TEXT ]
Pixels [ TEXT ]
Hardware_colours [ INT ]
used_kb [ INT ]
map [ TEXT ]
Type [ TEXT ]

phone :
Company_name [ TEXT ]
Hardware_Model_name [ TEXT ] primary_key
Accreditation_type [ TEXT ]
Accreditation_level [ TEXT ]
Date [ TEXT ]
chip_model [ TEXT ] phone.chip_model = chip_model.Model_name
screen_mode [ TEXT ] phone.screen_mode = screen_mode.Graphics_mode

Please write me a SQL statement that answers the following question: How many models do not have the wifi function? [/INST]

Output: SELECT count(*) FROM chip_model WHERE wifi  =  'No';


Input:
[INST] Here is a database schema:
chip_model :
Model_name [ TEXT ] primary_key
Launch_year [ INT ]
RAM_MiB [ INT ]
ROM_MiB [ INT ]
Slots [ TEXT ]
WiFi [ TEXT ]
Bluetooth [ TEXT ]

screen_mode :
Graphics_mode [ INT ] primary_key
Char_cells [ TEXT ]
Pixels [ TEXT ]
Hardware_colours [ INT ]
used_kb [ INT ]
map [ TEXT ]
Type [ TEXT ]

phone :
Company_name [ TEXT ]
Hardware_Model_name [ TEXT ] primary_key
Accreditation_type [ TEXT ]
Accreditation_level [ TEXT ]
Date [ TEXT ]
chip_model [ TEXT ] phone.chip_model = chip_model.Model_name
screen_mode [ TEXT ] phone.screen_mode = screen_mode.Graphics_mode

Please write me a SQL statement that answers the following question: Count the number of chip model that do not have wifi. [/INST]

Output: SELECT count(*) FROM chip_model WHERE wifi  =  'No';


Input:
[INST] Here is a database schema:
chip_model :
Model_name [ TEXT ] primary_key
Launch_year [ INT ]
RAM_MiB [ INT ]
ROM_MiB [ INT ]
Slots [ TEXT ]
WiFi [ TEXT ]
Bluetooth [ TEXT ]

screen_mode :
Graphics_mode [ INT ] primary_key
Char_cells [ TEXT ]
Pixels [ TEXT ]
Hardware_colours [ INT ]
used_kb [ INT ]
map [ TEXT ]
Type [ TEXT ]

phone :
Company_name [ TEXT ]
Hardware_Model_name [ TEXT ] primary_key
Accreditation_type [ TEXT ]
Accreditation_level [ TEXT ]
Date [ TEXT ]
chip_model [ TEXT ] phone.chip_model = chip_model.Model_name
screen_mode [ TEXT ] phone.screen_mode = screen_mode.Graphics_mode

Please write me a SQL statement that answers the following question: List all the model names sorted by their launch year. [/INST]

Output: SELECT model_name FROM chip_model ORDER BY launch_year;


Input:
[INST] Here is a database schema:
chip_model :
Model_name [ TEXT ] primary_key
Launch_year [ INT ]
RAM_MiB [ INT ]
ROM_MiB [ INT ]
Slots [ TEXT ]
WiFi [ TEXT ]
Bluetooth [ TEXT ]

screen_mode :
Graphics_mode [ INT ] primary_key
Char_cells [ TEXT ]
Pixels [ TEXT ]
Hardware_colours [ INT ]
used_kb [ INT ]
map [ TEXT ]
Type [ TEXT ]

phone :
Company_name [ TEXT ]
Hardware_Model_name [ TEXT ] primary_key
Accreditation_type [ TEXT ]
Accreditation_level [ TEXT ]
Date [ TEXT ]
chip_model [ TEXT ] phone.chip_model = chip_model.Model_name
screen_mode [ TEXT ] phone.screen_mode = screen_mode.Graphics_mode

Please write me a SQL statement that answers the following question: Find the average ram mib size of the chip models that are never used by any phone. [/INST]

Output: SELECT avg(RAM_MiB) FROM chip_model WHERE model_name NOT IN (SELECT chip_model FROM phone);


Input:
[INST] Here is a database schema:
chip_model :
Model_name [ TEXT ] primary_key
Launch_year [ INT ]
RAM_MiB [ INT ]
ROM_MiB [ INT ]
Slots [ TEXT ]
WiFi [ TEXT ]
Bluetooth [ TEXT ]

screen_mode :
Graphics_mode [ INT ] primary_key
Char_cells [ TEXT ]
Pixels [ TEXT ]
Hardware_colours [ INT ]
used_kb [ INT ]
map [ TEXT ]
Type [ TEXT ]

phone :
Company_name [ TEXT ]
Hardware_Model_name [ TEXT ] primary_key
Accreditation_type [ TEXT ]
Accreditation_level [ TEXT ]
Date [ TEXT ]
chip_model [ TEXT ] phone.chip_model = chip_model.Model_name
screen_mode [ TEXT ] phone.screen_mode = screen_mode.Graphics_mode

Please write me a SQL statement that answers the following question: Find the names of the chip models that are not used by any phone with full accreditation type. [/INST]

Output: SELECT model_name FROM chip_model EXCEPT SELECT chip_model FROM phone WHERE Accreditation_type  =  'Full';


Input:
[INST] Here is a database schema:
chip_model :
Model_name [ TEXT ] primary_key
Launch_year [ INT ]
RAM_MiB [ INT ]
ROM_MiB [ INT ]
Slots [ TEXT ]
WiFi [ TEXT ]
Bluetooth [ TEXT ]

screen_mode :
Graphics_mode [ INT ] primary_key
Char_cells [ TEXT ]
Pixels [ TEXT ]
Hardware_colours [ INT ]
used_kb [ INT ]
map [ TEXT ]
Type [ TEXT ]

phone :
Company_name [ TEXT ]
Hardware_Model_name [ TEXT ] primary_key
Accreditation_type [ TEXT ]
Accreditation_level [ TEXT ]
Date [ TEXT ]
chip_model [ TEXT ] phone.chip_model = chip_model.Model_name
screen_mode [ TEXT ] phone.screen_mode = screen_mode.Graphics_mode

Please write me a SQL statement that answers the following question: Find the pixels of the screen modes that are used by both phones with full accreditation types and phones with Provisional accreditation types. [/INST]

Output: SELECT t1.pixels FROM screen_mode AS t1 JOIN phone AS t2 ON t1.Graphics_mode  =  t2.screen_mode WHERE t2.Accreditation_type  =  'Provisional' INTERSECT SELECT t1.pixels FROM screen_mode AS t1 JOIN phone AS t2 ON t1.Graphics_mode  =  t2.screen_mode WHERE t2.Accreditation_type  =  'Full';


Input:
[INST] Here is a database schema:
country :
Country_id [ INT ] primary_key
Country_name [ TEXT ]
Capital [ TEXT ]
Official_native_language [ TEXT ]

team :
Team_id [ INT ] primary_key
Name [ TEXT ]

match_season :
Season [ INT ] primary_key
Player [ TEXT ]
Position [ TEXT ]
Country [ INT ] match_season.Country = country.Country_id
Team [ INT ] match_season.Team = team.Team_id
Draft_Pick_Number [ INT ]
Draft_Class [ TEXT ]
College [ TEXT ]

player :
Player_ID [ INT ] primary_key
Player [ TEXT ]
Years_Played [ TEXT ]
Total_WL [ TEXT ]
Singles_WL [ TEXT ]
Doubles_WL [ TEXT ]
Team [ INT ] player.Team = team.Team_id

Please write me a SQL statement that answers the following question: How many countries are there in total? [/INST]

Output: SELECT count(*) FROM country;


Input:
[INST] Here is a database schema:
country :
Country_id [ INT ] primary_key
Country_name [ TEXT ]
Capital [ TEXT ]
Official_native_language [ TEXT ]

team :
Team_id [ INT ] primary_key
Name [ TEXT ]

match_season :
Season [ INT ] primary_key
Player [ TEXT ]
Position [ TEXT ]
Country [ INT ] match_season.Country = country.Country_id
Team [ INT ] match_season.Team = team.Team_id
Draft_Pick_Number [ INT ]
Draft_Class [ TEXT ]
College [ TEXT ]

player :
Player_ID [ INT ] primary_key
Player [ TEXT ]
Years_Played [ TEXT ]
Total_WL [ TEXT ]
Singles_WL [ TEXT ]
Doubles_WL [ TEXT ]
Team [ INT ] player.Team = team.Team_id

Please write me a SQL statement that answers the following question: Count the number of countries. [/INST]

Output: SELECT count(*) FROM country;


Input:
[INST] Here is a database schema:
country :
Country_id [ INT ] primary_key
Country_name [ TEXT ]
Capital [ TEXT ]
Official_native_language [ TEXT ]

team :
Team_id [ INT ] primary_key
Name [ TEXT ]

match_season :
Season [ INT ] primary_key
Player [ TEXT ]
Position [ TEXT ]
Country [ INT ] match_season.Country = country.Country_id
Team [ INT ] match_season.Team = team.Team_id
Draft_Pick_Number [ INT ]
Draft_Class [ TEXT ]
College [ TEXT ]

player :
Player_ID [ INT ] primary_key
Player [ TEXT ]
Years_Played [ TEXT ]
Total_WL [ TEXT ]
Singles_WL [ TEXT ]
Doubles_WL [ TEXT ]
Team [ INT ] player.Team = team.Team_id

Please write me a SQL statement that answers the following question: Show the country name and capital of all countries. [/INST]

Output: SELECT Country_name ,  Capital FROM country;


Input:
[INST] Here is a database schema:
country :
Country_id [ INT ] primary_key
Country_name [ TEXT ]
Capital [ TEXT ]
Official_native_language [ TEXT ]

team :
Team_id [ INT ] primary_key
Name [ TEXT ]

match_season :
Season [ INT ] primary_key
Player [ TEXT ]
Position [ TEXT ]
Country [ INT ] match_season.Country = country.Country_id
Team [ INT ] match_season.Team = team.Team_id
Draft_Pick_Number [ INT ]
Draft_Class [ TEXT ]
College [ TEXT ]

player :
Player_ID [ INT ] primary_key
Player [ TEXT ]
Years_Played [ TEXT ]
Total_WL [ TEXT ]
Singles_WL [ TEXT ]
Doubles_WL [ TEXT ]
Team [ INT ] player.Team = team.Team_id

Please write me a SQL statement that answers the following question: What are the names and capitals of each country? [/INST]

Output: SELECT Country_name ,  Capital FROM country;


Input:
[INST] Here is a database schema:
country :
Country_id [ INT ] primary_key
Country_name [ TEXT ]
Capital [ TEXT ]
Official_native_language [ TEXT ]

team :
Team_id [ INT ] primary_key
Name [ TEXT ]

match_season :
Season [ INT ] primary_key
Player [ TEXT ]
Position [ TEXT ]
Country [ INT ] match_season.Country = country.Country_id
Team [ INT ] match_season.Team = team.Team_id
Draft_Pick_Number [ INT ]
Draft_Class [ TEXT ]
College [ TEXT ]

player :
Player_ID [ INT ] primary_key
Player [ TEXT ]
Years_Played [ TEXT ]
Total_WL [ TEXT ]
Singles_WL [ TEXT ]
Doubles_WL [ TEXT ]
Team [ INT ] player.Team = team.Team_id

Please write me a SQL statement that answers the following question: Show all official native languages that contain the word "English". [/INST]

Output: SELECT Official_native_language FROM country WHERE Official_native_language LIKE "%English%";


Input:
[INST] Here is a database schema:
country :
Country_id [ INT ] primary_key
Country_name [ TEXT ]
Capital [ TEXT ]
Official_native_language [ TEXT ]

team :
Team_id [ INT ] primary_key
Name [ TEXT ]

match_season :
Season [ INT ] primary_key
Player [ TEXT ]
Position [ TEXT ]
Country [ INT ] match_season.Country = country.Country_id
Team [ INT ] match_season.Team = team.Team_id
Draft_Pick_Number [ INT ]
Draft_Class [ TEXT ]
College [ TEXT ]

player :
Player_ID [ INT ] primary_key
Player [ TEXT ]
Years_Played [ TEXT ]
Total_WL [ TEXT ]
Singles_WL [ TEXT ]
Doubles_WL [ TEXT ]
Team [ INT ] player.Team = team.Team_id

Please write me a SQL statement that answers the following question: What are the official native languages that contain the string "English". [/INST]

Output: SELECT Official_native_language FROM country WHERE Official_native_language LIKE "%English%";


Input:
[INST] Here is a database schema:
country :
Country_id [ INT ] primary_key
Country_name [ TEXT ]
Capital [ TEXT ]
Official_native_language [ TEXT ]

team :
Team_id [ INT ] primary_key
Name [ TEXT ]

match_season :
Season [ INT ] primary_key
Player [ TEXT ]
Position [ TEXT ]
Country [ INT ] match_season.Country = country.Country_id
Team [ INT ] match_season.Team = team.Team_id
Draft_Pick_Number [ INT ]
Draft_Class [ TEXT ]
College [ TEXT ]

player :
Player_ID [ INT ] primary_key
Player [ TEXT ]
Years_Played [ TEXT ]
Total_WL [ TEXT ]
Singles_WL [ TEXT ]
Doubles_WL [ TEXT ]
Team [ INT ] player.Team = team.Team_id

Please write me a SQL statement that answers the following question: Show all distinct positions of matches. [/INST]

Output: SELECT DISTINCT POSITION FROM match_season;


Input:
[INST] Here is a database schema:
country :
Country_id [ INT ] primary_key
Country_name [ TEXT ]
Capital [ TEXT ]
Official_native_language [ TEXT ]

team :
Team_id [ INT ] primary_key
Name [ TEXT ]

match_season :
Season [ INT ] primary_key
Player [ TEXT ]
Position [ TEXT ]
Country [ INT ] match_season.Country = country.Country_id
Team [ INT ] match_season.Team = team.Team_id
Draft_Pick_Number [ INT ]
Draft_Class [ TEXT ]
College [ TEXT ]

player :
Player_ID [ INT ] primary_key
Player [ TEXT ]
Years_Played [ TEXT ]
Total_WL [ TEXT ]
Singles_WL [ TEXT ]
Doubles_WL [ TEXT ]
Team [ INT ] player.Team = team.Team_id

Please write me a SQL statement that answers the following question: What are the different positions for match season? [/INST]

Output: SELECT DISTINCT POSITION FROM match_season;


Input:
[INST] Here is a database schema:
country :
Country_id [ INT ] primary_key
Country_name [ TEXT ]
Capital [ TEXT ]
Official_native_language [ TEXT ]

team :
Team_id [ INT ] primary_key
Name [ TEXT ]

match_season :
Season [ INT ] primary_key
Player [ TEXT ]
Position [ TEXT ]
Country [ INT ] match_season.Country = country.Country_id
Team [ INT ] match_season.Team = team.Team_id
Draft_Pick_Number [ INT ]
Draft_Class [ TEXT ]
College [ TEXT ]

player :
Player_ID [ INT ] primary_key
Player [ TEXT ]
Years_Played [ TEXT ]
Total_WL [ TEXT ]
Singles_WL [ TEXT ]
Doubles_WL [ TEXT ]
Team [ INT ] player.Team = team.Team_id

Please write me a SQL statement that answers the following question: Show the players from college UCLA. [/INST]

Output: SELECT Player FROM match_season WHERE College  =  "UCLA";


Input:
[INST] Here is a database schema:
country :
Country_id [ INT ] primary_key
Country_name [ TEXT ]
Capital [ TEXT ]
Official_native_language [ TEXT ]

team :
Team_id [ INT ] primary_key
Name [ TEXT ]

match_season :
Season [ INT ] primary_key
Player [ TEXT ]
Position [ TEXT ]
Country [ INT ] match_season.Country = country.Country_id
Team [ INT ] match_season.Team = team.Team_id
Draft_Pick_Number [ INT ]
Draft_Class [ TEXT ]
College [ TEXT ]

player :
Player_ID [ INT ] primary_key
Player [ TEXT ]
Years_Played [ TEXT ]
Total_WL [ TEXT ]
Singles_WL [ TEXT ]
Doubles_WL [ TEXT ]
Team [ INT ] player.Team = team.Team_id

Please write me a SQL statement that answers the following question: Who are the players from UCLA? [/INST]

Output: SELECT Player FROM match_season WHERE College  =  "UCLA";


Input:
[INST] Here is a database schema:
country :
Country_id [ INT ] primary_key
Country_name [ TEXT ]
Capital [ TEXT ]
Official_native_language [ TEXT ]

team :
Team_id [ INT ] primary_key
Name [ TEXT ]

match_season :
Season [ INT ] primary_key
Player [ TEXT ]
Position [ TEXT ]
Country [ INT ] match_season.Country = country.Country_id
Team [ INT ] match_season.Team = team.Team_id
Draft_Pick_Number [ INT ]
Draft_Class [ TEXT ]
College [ TEXT ]

player :
Player_ID [ INT ] primary_key
Player [ TEXT ]
Years_Played [ TEXT ]
Total_WL [ TEXT ]
Singles_WL [ TEXT ]
Doubles_WL [ TEXT ]
Team [ INT ] player.Team = team.Team_id

Please write me a SQL statement that answers the following question: Show the distinct position of players from college UCLA or Duke. [/INST]

Output: SELECT DISTINCT POSITION FROM match_season WHERE College  =  "UCLA" OR College  =  "Duke";


Input:
[INST] Here is a database schema:
country :
Country_id [ INT ] primary_key
Country_name [ TEXT ]
Capital [ TEXT ]
Official_native_language [ TEXT ]

team :
Team_id [ INT ] primary_key
Name [ TEXT ]

match_season :
Season [ INT ] primary_key
Player [ TEXT ]
Position [ TEXT ]
Country [ INT ] match_season.Country = country.Country_id
Team [ INT ] match_season.Team = team.Team_id
Draft_Pick_Number [ INT ]
Draft_Class [ TEXT ]
College [ TEXT ]

player :
Player_ID [ INT ] primary_key
Player [ TEXT ]
Years_Played [ TEXT ]
Total_WL [ TEXT ]
Singles_WL [ TEXT ]
Doubles_WL [ TEXT ]
Team [ INT ] player.Team = team.Team_id

Please write me a SQL statement that answers the following question: What are the different positions of players from UCLA or Duke colleges? [/INST]

Output: SELECT DISTINCT POSITION FROM match_season WHERE College  =  "UCLA" OR College  =  "Duke";


Input:
[INST] Here is a database schema:
country :
Country_id [ INT ] primary_key
Country_name [ TEXT ]
Capital [ TEXT ]
Official_native_language [ TEXT ]

team :
Team_id [ INT ] primary_key
Name [ TEXT ]

match_season :
Season [ INT ] primary_key
Player [ TEXT ]
Position [ TEXT ]
Country [ INT ] match_season.Country = country.Country_id
Team [ INT ] match_season.Team = team.Team_id
Draft_Pick_Number [ INT ]
Draft_Class [ TEXT ]
College [ TEXT ]

player :
Player_ID [ INT ] primary_key
Player [ TEXT ]
Years_Played [ TEXT ]
Total_WL [ TEXT ]
Singles_WL [ TEXT ]
Doubles_WL [ TEXT ]
Team [ INT ] player.Team = team.Team_id

Please write me a SQL statement that answers the following question: Show the draft pick numbers and draft classes of players whose positions are defenders. [/INST]

Output: SELECT Draft_Pick_Number ,  Draft_Class FROM match_season WHERE POSITION  =  "Defender";


Input:
[INST] Here is a database schema:
country :
Country_id [ INT ] primary_key
Country_name [ TEXT ]
Capital [ TEXT ]
Official_native_language [ TEXT ]

team :
Team_id [ INT ] primary_key
Name [ TEXT ]

match_season :
Season [ INT ] primary_key
Player [ TEXT ]
Position [ TEXT ]
Country [ INT ] match_season.Country = country.Country_id
Team [ INT ] match_season.Team = team.Team_id
Draft_Pick_Number [ INT ]
Draft_Class [ TEXT ]
College [ TEXT ]

player :
Player_ID [ INT ] primary_key
Player [ TEXT ]
Years_Played [ TEXT ]
Total_WL [ TEXT ]
Singles_WL [ TEXT ]
Doubles_WL [ TEXT ]
Team [ INT ] player.Team = team.Team_id

Please write me a SQL statement that answers the following question: What are the draft pick numbers and draft classes for players who play the Defender position? [/INST]

Output: SELECT Draft_Pick_Number ,  Draft_Class FROM match_season WHERE POSITION  =  "Defender";


Input:
[INST] Here is a database schema:
country :
Country_id [ INT ] primary_key
Country_name [ TEXT ]
Capital [ TEXT ]
Official_native_language [ TEXT ]

team :
Team_id [ INT ] primary_key
Name [ TEXT ]

match_season :
Season [ INT ] primary_key
Player [ TEXT ]
Position [ TEXT ]
Country [ INT ] match_season.Country = country.Country_id
Team [ INT ] match_season.Team = team.Team_id
Draft_Pick_Number [ INT ]
Draft_Class [ TEXT ]
College [ TEXT ]

player :
Player_ID [ INT ] primary_key
Player [ TEXT ]
Years_Played [ TEXT ]
Total_WL [ TEXT ]
Singles_WL [ TEXT ]
Doubles_WL [ TEXT ]
Team [ INT ] player.Team = team.Team_id

Please write me a SQL statement that answers the following question: How many distinct teams are involved in match seasons? [/INST]

Output: SELECT count(DISTINCT Team) FROM match_season;


Input:
[INST] Here is a database schema:
country :
Country_id [ INT ] primary_key
Country_name [ TEXT ]
Capital [ TEXT ]
Official_native_language [ TEXT ]

team :
Team_id [ INT ] primary_key
Name [ TEXT ]

match_season :
Season [ INT ] primary_key
Player [ TEXT ]
Position [ TEXT ]
Country [ INT ] match_season.Country = country.Country_id
Team [ INT ] match_season.Team = team.Team_id
Draft_Pick_Number [ INT ]
Draft_Class [ TEXT ]
College [ TEXT ]

player :
Player_ID [ INT ] primary_key
Player [ TEXT ]
Years_Played [ TEXT ]
Total_WL [ TEXT ]
Singles_WL [ TEXT ]
Doubles_WL [ TEXT ]
Team [ INT ] player.Team = team.Team_id

Please write me a SQL statement that answers the following question: Count the number of different teams involved in match season. [/INST]

Output: SELECT count(DISTINCT Team) FROM match_season;


Input:
[INST] Here is a database schema:
country :
Country_id [ INT ] primary_key
Country_name [ TEXT ]
Capital [ TEXT ]
Official_native_language [ TEXT ]

team :
Team_id [ INT ] primary_key
Name [ TEXT ]

match_season :
Season [ INT ] primary_key
Player [ TEXT ]
Position [ TEXT ]
Country [ INT ] match_season.Country = country.Country_id
Team [ INT ] match_season.Team = team.Team_id
Draft_Pick_Number [ INT ]
Draft_Class [ TEXT ]
College [ TEXT ]

player :
Player_ID [ INT ] primary_key
Player [ TEXT ]
Years_Played [ TEXT ]
Total_WL [ TEXT ]
Singles_WL [ TEXT ]
Doubles_WL [ TEXT ]
Team [ INT ] player.Team = team.Team_id

Please write me a SQL statement that answers the following question: Show the players and the years played. [/INST]

Output: SELECT Player ,  Years_Played FROM player;


Input:
[INST] Here is a database schema:
country :
Country_id [ INT ] primary_key
Country_name [ TEXT ]
Capital [ TEXT ]
Official_native_language [ TEXT ]

team :
Team_id [ INT ] primary_key
Name [ TEXT ]

match_season :
Season [ INT ] primary_key
Player [ TEXT ]
Position [ TEXT ]
Country [ INT ] match_season.Country = country.Country_id
Team [ INT ] match_season.Team = team.Team_id
Draft_Pick_Number [ INT ]
Draft_Class [ TEXT ]
College [ TEXT ]

player :
Player_ID [ INT ] primary_key
Player [ TEXT ]
Years_Played [ TEXT ]
Total_WL [ TEXT ]
Singles_WL [ TEXT ]
Doubles_WL [ TEXT ]
Team [ INT ] player.Team = team.Team_id

Please write me a SQL statement that answers the following question: Who are the different players and how many years has each played? [/INST]

Output: SELECT Player ,  Years_Played FROM player;


Input:
[INST] Here is a database schema:
country :
Country_id [ INT ] primary_key
Country_name [ TEXT ]
Capital [ TEXT ]
Official_native_language [ TEXT ]

team :
Team_id [ INT ] primary_key
Name [ TEXT ]

match_season :
Season [ INT ] primary_key
Player [ TEXT ]
Position [ TEXT ]
Country [ INT ] match_season.Country = country.Country_id
Team [ INT ] match_season.Team = team.Team_id
Draft_Pick_Number [ INT ]
Draft_Class [ TEXT ]
College [ TEXT ]

player :
Player_ID [ INT ] primary_key
Player [ TEXT ]
Years_Played [ TEXT ]
Total_WL [ TEXT ]
Singles_WL [ TEXT ]
Doubles_WL [ TEXT ]
Team [ INT ] player.Team = team.Team_id

Please write me a SQL statement that answers the following question: Show all team names. [/INST]

Output: SELECT Name FROM Team;


Input:
[INST] Here is a database schema:
country :
Country_id [ INT ] primary_key
Country_name [ TEXT ]
Capital [ TEXT ]
Official_native_language [ TEXT ]

team :
Team_id [ INT ] primary_key
Name [ TEXT ]

match_season :
Season [ INT ] primary_key
Player [ TEXT ]
Position [ TEXT ]
Country [ INT ] match_season.Country = country.Country_id
Team [ INT ] match_season.Team = team.Team_id
Draft_Pick_Number [ INT ]
Draft_Class [ TEXT ]
College [ TEXT ]

player :
Player_ID [ INT ] primary_key
Player [ TEXT ]
Years_Played [ TEXT ]
Total_WL [ TEXT ]
Singles_WL [ TEXT ]
Doubles_WL [ TEXT ]
Team [ INT ] player.Team = team.Team_id

Please write me a SQL statement that answers the following question: What are the names of all teams? [/INST]

Output: SELECT Name FROM Team;


Input:
[INST] Here is a database schema:
country :
Country_id [ INT ] primary_key
Country_name [ TEXT ]
Capital [ TEXT ]
Official_native_language [ TEXT ]

team :
Team_id [ INT ] primary_key
Name [ TEXT ]

match_season :
Season [ INT ] primary_key
Player [ TEXT ]
Position [ TEXT ]
Country [ INT ] match_season.Country = country.Country_id
Team [ INT ] match_season.Team = team.Team_id
Draft_Pick_Number [ INT ]
Draft_Class [ TEXT ]
College [ TEXT ]

player :
Player_ID [ INT ] primary_key
Player [ TEXT ]
Years_Played [ TEXT ]
Total_WL [ TEXT ]
Singles_WL [ TEXT ]
Doubles_WL [ TEXT ]
Team [ INT ] player.Team = team.Team_id

Please write me a SQL statement that answers the following question: Show the season, the player, and the name of the country that player belongs to. [/INST]

Output: SELECT T2.Season ,  T2.Player ,  T1.Country_name FROM country AS T1 JOIN match_season AS T2 ON T1.Country_id  =  T2.Country;


Input:
[INST] Here is a database schema:
country :
Country_id [ INT ] primary_key
Country_name [ TEXT ]
Capital [ TEXT ]
Official_native_language [ TEXT ]

team :
Team_id [ INT ] primary_key
Name [ TEXT ]

match_season :
Season [ INT ] primary_key
Player [ TEXT ]
Position [ TEXT ]
Country [ INT ] match_season.Country = country.Country_id
Team [ INT ] match_season.Team = team.Team_id
Draft_Pick_Number [ INT ]
Draft_Class [ TEXT ]
College [ TEXT ]

player :
Player_ID [ INT ] primary_key
Player [ TEXT ]
Years_Played [ TEXT ]
Total_WL [ TEXT ]
Singles_WL [ TEXT ]
Doubles_WL [ TEXT ]
Team [ INT ] player.Team = team.Team_id

Please write me a SQL statement that answers the following question: For each player, what are their name, season, and country that they belong to? [/INST]

Output: SELECT T2.Season ,  T2.Player ,  T1.Country_name FROM country AS T1 JOIN match_season AS T2 ON T1.Country_id  =  T2.Country;


Input:
[INST] Here is a database schema:
country :
Country_id [ INT ] primary_key
Country_name [ TEXT ]
Capital [ TEXT ]
Official_native_language [ TEXT ]

team :
Team_id [ INT ] primary_key
Name [ TEXT ]

match_season :
Season [ INT ] primary_key
Player [ TEXT ]
Position [ TEXT ]
Country [ INT ] match_season.Country = country.Country_id
Team [ INT ] match_season.Team = team.Team_id
Draft_Pick_Number [ INT ]
Draft_Class [ TEXT ]
College [ TEXT ]

player :
Player_ID [ INT ] primary_key
Player [ TEXT ]
Years_Played [ TEXT ]
Total_WL [ TEXT ]
Singles_WL [ TEXT ]
Doubles_WL [ TEXT ]
Team [ INT ] player.Team = team.Team_id

Please write me a SQL statement that answers the following question: Which players are from Indonesia? [/INST]

Output: SELECT T2.Player FROM country AS T1 JOIN match_season AS T2 ON T1.Country_id  =  T2.Country WHERE T1.Country_name  =  "Indonesia";


Input:
[INST] Here is a database schema:
country :
Country_id [ INT ] primary_key
Country_name [ TEXT ]
Capital [ TEXT ]
Official_native_language [ TEXT ]

team :
Team_id [ INT ] primary_key
Name [ TEXT ]

match_season :
Season [ INT ] primary_key
Player [ TEXT ]
Position [ TEXT ]
Country [ INT ] match_season.Country = country.Country_id
Team [ INT ] match_season.Team = team.Team_id
Draft_Pick_Number [ INT ]
Draft_Class [ TEXT ]
College [ TEXT ]

player :
Player_ID [ INT ] primary_key
Player [ TEXT ]
Years_Played [ TEXT ]
Total_WL [ TEXT ]
Singles_WL [ TEXT ]
Doubles_WL [ TEXT ]
Team [ INT ] player.Team = team.Team_id

Please write me a SQL statement that answers the following question: Who are the players from Indonesia? [/INST]

Output: SELECT T2.Player FROM country AS T1 JOIN match_season AS T2 ON T1.Country_id  =  T2.Country WHERE T1.Country_name  =  "Indonesia";


Input:
[INST] Here is a database schema:
country :
Country_id [ INT ] primary_key
Country_name [ TEXT ]
Capital [ TEXT ]
Official_native_language [ TEXT ]

team :
Team_id [ INT ] primary_key
Name [ TEXT ]

match_season :
Season [ INT ] primary_key
Player [ TEXT ]
Position [ TEXT ]
Country [ INT ] match_season.Country = country.Country_id
Team [ INT ] match_season.Team = team.Team_id
Draft_Pick_Number [ INT ]
Draft_Class [ TEXT ]
College [ TEXT ]

player :
Player_ID [ INT ] primary_key
Player [ TEXT ]
Years_Played [ TEXT ]
Total_WL [ TEXT ]
Singles_WL [ TEXT ]
Doubles_WL [ TEXT ]
Team [ INT ] player.Team = team.Team_id

Please write me a SQL statement that answers the following question: What are the distinct positions of the players from a country whose capital is Dublin? [/INST]

Output: SELECT DISTINCT T2.Position FROM country AS T1 JOIN match_season AS T2 ON T1.Country_id  =  T2.Country WHERE T1.Capital  =  "Dublin";


Input:
[INST] Here is a database schema:
country :
Country_id [ INT ] primary_key
Country_name [ TEXT ]
Capital [ TEXT ]
Official_native_language [ TEXT ]

team :
Team_id [ INT ] primary_key
Name [ TEXT ]

match_season :
Season [ INT ] primary_key
Player [ TEXT ]
Position [ TEXT ]
Country [ INT ] match_season.Country = country.Country_id
Team [ INT ] match_season.Team = team.Team_id
Draft_Pick_Number [ INT ]
Draft_Class [ TEXT ]
College [ TEXT ]

player :
Player_ID [ INT ] primary_key
Player [ TEXT ]
Years_Played [ TEXT ]
Total_WL [ TEXT ]
Singles_WL [ TEXT ]
Doubles_WL [ TEXT ]
Team [ INT ] player.Team = team.Team_id

Please write me a SQL statement that answers the following question: Give the different positions of players who play for the country with the capital Dublin. [/INST]

Output: SELECT DISTINCT T2.Position FROM country AS T1 JOIN match_season AS T2 ON T1.Country_id  =  T2.Country WHERE T1.Capital  =  "Dublin";


Input:
[INST] Here is a database schema:
country :
Country_id [ INT ] primary_key
Country_name [ TEXT ]
Capital [ TEXT ]
Official_native_language [ TEXT ]

team :
Team_id [ INT ] primary_key
Name [ TEXT ]

match_season :
Season [ INT ] primary_key
Player [ TEXT ]
Position [ TEXT ]
Country [ INT ] match_season.Country = country.Country_id
Team [ INT ] match_season.Team = team.Team_id
Draft_Pick_Number [ INT ]
Draft_Class [ TEXT ]
College [ TEXT ]

player :
Player_ID [ INT ] primary_key
Player [ TEXT ]
Years_Played [ TEXT ]
Total_WL [ TEXT ]
Singles_WL [ TEXT ]
Doubles_WL [ TEXT ]
Team [ INT ] player.Team = team.Team_id

Please write me a SQL statement that answers the following question: What are the official languages of the countries of players from Maryland or Duke college? [/INST]

Output: SELECT T1.Official_native_language FROM country AS T1 JOIN match_season AS T2 ON T1.Country_id  =  T2.Country WHERE T2.College  =  "Maryland" OR T2.College  =  "Duke";


Input:
[INST] Here is a database schema:
country :
Country_id [ INT ] primary_key
Country_name [ TEXT ]
Capital [ TEXT ]
Official_native_language [ TEXT ]

team :
Team_id [ INT ] primary_key
Name [ TEXT ]

match_season :
Season [ INT ] primary_key
Player [ TEXT ]
Position [ TEXT ]
Country [ INT ] match_season.Country = country.Country_id
Team [ INT ] match_season.Team = team.Team_id
Draft_Pick_Number [ INT ]
Draft_Class [ TEXT ]
College [ TEXT ]

player :
Player_ID [ INT ] primary_key
Player [ TEXT ]
Years_Played [ TEXT ]
Total_WL [ TEXT ]
Singles_WL [ TEXT ]
Doubles_WL [ TEXT ]
Team [ INT ] player.Team = team.Team_id

Please write me a SQL statement that answers the following question: Return the official native languages of countries who have players from Maryland or Duke colleges. [/INST]

Output: SELECT T1.Official_native_language FROM country AS T1 JOIN match_season AS T2 ON T1.Country_id  =  T2.Country WHERE T2.College  =  "Maryland" OR T2.College  =  "Duke";


Input:
[INST] Here is a database schema:
country :
Country_id [ INT ] primary_key
Country_name [ TEXT ]
Capital [ TEXT ]
Official_native_language [ TEXT ]

team :
Team_id [ INT ] primary_key
Name [ TEXT ]

match_season :
Season [ INT ] primary_key
Player [ TEXT ]
Position [ TEXT ]
Country [ INT ] match_season.Country = country.Country_id
Team [ INT ] match_season.Team = team.Team_id
Draft_Pick_Number [ INT ]
Draft_Class [ TEXT ]
College [ TEXT ]

player :
Player_ID [ INT ] primary_key
Player [ TEXT ]
Years_Played [ TEXT ]
Total_WL [ TEXT ]
Singles_WL [ TEXT ]
Doubles_WL [ TEXT ]
Team [ INT ] player.Team = team.Team_id

Please write me a SQL statement that answers the following question: How many distinct official languages are there among countries of players whose positions are defenders. [/INST]

Output: SELECT count(DISTINCT T1.Official_native_language) FROM country AS T1 JOIN match_season AS T2 ON T1.Country_id  =  T2.Country WHERE T2.Position  =  "Defender";


Input:
[INST] Here is a database schema:
country :
Country_id [ INT ] primary_key
Country_name [ TEXT ]
Capital [ TEXT ]
Official_native_language [ TEXT ]

team :
Team_id [ INT ] primary_key
Name [ TEXT ]

match_season :
Season [ INT ] primary_key
Player [ TEXT ]
Position [ TEXT ]
Country [ INT ] match_season.Country = country.Country_id
Team [ INT ] match_season.Team = team.Team_id
Draft_Pick_Number [ INT ]
Draft_Class [ TEXT ]
College [ TEXT ]

player :
Player_ID [ INT ] primary_key
Player [ TEXT ]
Years_Played [ TEXT ]
Total_WL [ TEXT ]
Singles_WL [ TEXT ]
Doubles_WL [ TEXT ]
Team [ INT ] player.Team = team.Team_id

Please write me a SQL statement that answers the following question: Count the number of different official languages corresponding to countries that players who play Defender are from. [/INST]

Output: SELECT count(DISTINCT T1.Official_native_language) FROM country AS T1 JOIN match_season AS T2 ON T1.Country_id  =  T2.Country WHERE T2.Position  =  "Defender";


Input:
[INST] Here is a database schema:
country :
Country_id [ INT ] primary_key
Country_name [ TEXT ]
Capital [ TEXT ]
Official_native_language [ TEXT ]

team :
Team_id [ INT ] primary_key
Name [ TEXT ]

match_season :
Season [ INT ] primary_key
Player [ TEXT ]
Position [ TEXT ]
Country [ INT ] match_season.Country = country.Country_id
Team [ INT ] match_season.Team = team.Team_id
Draft_Pick_Number [ INT ]
Draft_Class [ TEXT ]
College [ TEXT ]

player :
Player_ID [ INT ] primary_key
Player [ TEXT ]
Years_Played [ TEXT ]
Total_WL [ TEXT ]
Singles_WL [ TEXT ]
Doubles_WL [ TEXT ]
Team [ INT ] player.Team = team.Team_id

Please write me a SQL statement that answers the following question: Show the season, the player, and the name of the team that players belong to. [/INST]

Output: SELECT T1.Season ,  T1.Player ,  T2.Name FROM match_season AS T1 JOIN team AS T2 ON T1.Team  =  T2.Team_id;


Input:
[INST] Here is a database schema:
country :
Country_id [ INT ] primary_key
Country_name [ TEXT ]
Capital [ TEXT ]
Official_native_language [ TEXT ]

team :
Team_id [ INT ] primary_key
Name [ TEXT ]

match_season :
Season [ INT ] primary_key
Player [ TEXT ]
Position [ TEXT ]
Country [ INT ] match_season.Country = country.Country_id
Team [ INT ] match_season.Team = team.Team_id
Draft_Pick_Number [ INT ]
Draft_Class [ TEXT ]
College [ TEXT ]

player :
Player_ID [ INT ] primary_key
Player [ TEXT ]
Years_Played [ TEXT ]
Total_WL [ TEXT ]
Singles_WL [ TEXT ]
Doubles_WL [ TEXT ]
Team [ INT ] player.Team = team.Team_id

Please write me a SQL statement that answers the following question: Who are the different players, what season do they play in, and what is the name of the team they are on? [/INST]

Output: SELECT T1.Season ,  T1.Player ,  T2.Name FROM match_season AS T1 JOIN team AS T2 ON T1.Team  =  T2.Team_id;


Input:
[INST] Here is a database schema:
country :
Country_id [ INT ] primary_key
Country_name [ TEXT ]
Capital [ TEXT ]
Official_native_language [ TEXT ]

team :
Team_id [ INT ] primary_key
Name [ TEXT ]

match_season :
Season [ INT ] primary_key
Player [ TEXT ]
Position [ TEXT ]
Country [ INT ] match_season.Country = country.Country_id
Team [ INT ] match_season.Team = team.Team_id
Draft_Pick_Number [ INT ]
Draft_Class [ TEXT ]
College [ TEXT ]

player :
Player_ID [ INT ] primary_key
Player [ TEXT ]
Years_Played [ TEXT ]
Total_WL [ TEXT ]
Singles_WL [ TEXT ]
Doubles_WL [ TEXT ]
Team [ INT ] player.Team = team.Team_id

Please write me a SQL statement that answers the following question: Show the positions of the players from the team with name "Ryley Goldner". [/INST]

Output: SELECT T1.Position FROM match_season AS T1 JOIN team AS T2 ON T1.Team  =  T2.Team_id WHERE T2.Name  =  "Ryley Goldner";


Input:
[INST] Here is a database schema:
country :
Country_id [ INT ] primary_key
Country_name [ TEXT ]
Capital [ TEXT ]
Official_native_language [ TEXT ]

team :
Team_id [ INT ] primary_key
Name [ TEXT ]

match_season :
Season [ INT ] primary_key
Player [ TEXT ]
Position [ TEXT ]
Country [ INT ] match_season.Country = country.Country_id
Team [ INT ] match_season.Team = team.Team_id
Draft_Pick_Number [ INT ]
Draft_Class [ TEXT ]
College [ TEXT ]

player :
Player_ID [ INT ] primary_key
Player [ TEXT ]
Years_Played [ TEXT ]
Total_WL [ TEXT ]
Singles_WL [ TEXT ]
Doubles_WL [ TEXT ]
Team [ INT ] player.Team = team.Team_id

Please write me a SQL statement that answers the following question: Return the positions of players on the team Ryley Goldner. [/INST]

Output: SELECT T1.Position FROM match_season AS T1 JOIN team AS T2 ON T1.Team  =  T2.Team_id WHERE T2.Name  =  "Ryley Goldner";


Input:
[INST] Here is a database schema:
country :
Country_id [ INT ] primary_key
Country_name [ TEXT ]
Capital [ TEXT ]
Official_native_language [ TEXT ]

team :
Team_id [ INT ] primary_key
Name [ TEXT ]

match_season :
Season [ INT ] primary_key
Player [ TEXT ]
Position [ TEXT ]
Country [ INT ] match_season.Country = country.Country_id
Team [ INT ] match_season.Team = team.Team_id
Draft_Pick_Number [ INT ]
Draft_Class [ TEXT ]
College [ TEXT ]

player :
Player_ID [ INT ] primary_key
Player [ TEXT ]
Years_Played [ TEXT ]
Total_WL [ TEXT ]
Singles_WL [ TEXT ]
Doubles_WL [ TEXT ]
Team [ INT ] player.Team = team.Team_id

Please write me a SQL statement that answers the following question: How many distinct colleges are associated with players from the team with name "Columbus Crew". [/INST]

Output: SELECT count(DISTINCT T1.College) FROM match_season AS T1 JOIN team AS T2 ON T1.Team  =  T2.Team_id WHERE T2.Name  =  "Columbus Crew";


Input:
[INST] Here is a database schema:
country :
Country_id [ INT ] primary_key
Country_name [ TEXT ]
Capital [ TEXT ]
Official_native_language [ TEXT ]

team :
Team_id [ INT ] primary_key
Name [ TEXT ]

match_season :
Season [ INT ] primary_key
Player [ TEXT ]
Position [ TEXT ]
Country [ INT ] match_season.Country = country.Country_id
Team [ INT ] match_season.Team = team.Team_id
Draft_Pick_Number [ INT ]
Draft_Class [ TEXT ]
College [ TEXT ]

player :
Player_ID [ INT ] primary_key
Player [ TEXT ]
Years_Played [ TEXT ]
Total_WL [ TEXT ]
Singles_WL [ TEXT ]
Doubles_WL [ TEXT ]
Team [ INT ] player.Team = team.Team_id

Please write me a SQL statement that answers the following question: Count the number of different colleges that players who play for Columbus Crew are from. [/INST]

Output: SELECT count(DISTINCT T1.College) FROM match_season AS T1 JOIN team AS T2 ON T1.Team  =  T2.Team_id WHERE T2.Name  =  "Columbus Crew";


Input:
[INST] Here is a database schema:
country :
Country_id [ INT ] primary_key
Country_name [ TEXT ]
Capital [ TEXT ]
Official_native_language [ TEXT ]

team :
Team_id [ INT ] primary_key
Name [ TEXT ]

match_season :
Season [ INT ] primary_key
Player [ TEXT ]
Position [ TEXT ]
Country [ INT ] match_season.Country = country.Country_id
Team [ INT ] match_season.Team = team.Team_id
Draft_Pick_Number [ INT ]
Draft_Class [ TEXT ]
College [ TEXT ]

player :
Player_ID [ INT ] primary_key
Player [ TEXT ]
Years_Played [ TEXT ]
Total_WL [ TEXT ]
Singles_WL [ TEXT ]
Doubles_WL [ TEXT ]
Team [ INT ] player.Team = team.Team_id

Please write me a SQL statement that answers the following question: Show the players and years played for players from team "Columbus Crew". [/INST]

Output: SELECT T1.Player , T1.Years_Played FROM player AS T1 JOIN team AS T2 ON T1.Team  =  T2.Team_id WHERE T2.Name  =  "Columbus Crew";


Input:
[INST] Here is a database schema:
country :
Country_id [ INT ] primary_key
Country_name [ TEXT ]
Capital [ TEXT ]
Official_native_language [ TEXT ]

team :
Team_id [ INT ] primary_key
Name [ TEXT ]

match_season :
Season [ INT ] primary_key
Player [ TEXT ]
Position [ TEXT ]
Country [ INT ] match_season.Country = country.Country_id
Team [ INT ] match_season.Team = team.Team_id
Draft_Pick_Number [ INT ]
Draft_Class [ TEXT ]
College [ TEXT ]

player :
Player_ID [ INT ] primary_key
Player [ TEXT ]
Years_Played [ TEXT ]
Total_WL [ TEXT ]
Singles_WL [ TEXT ]
Doubles_WL [ TEXT ]
Team [ INT ] player.Team = team.Team_id

Please write me a SQL statement that answers the following question: What are the players who played for Columbus Crew, and how many years did each play for? [/INST]

Output: SELECT T1.Player , T1.Years_Played FROM player AS T1 JOIN team AS T2 ON T1.Team  =  T2.Team_id WHERE T2.Name  =  "Columbus Crew";


Input:
[INST] Here is a database schema:
country :
Country_id [ INT ] primary_key
Country_name [ TEXT ]
Capital [ TEXT ]
Official_native_language [ TEXT ]

team :
Team_id [ INT ] primary_key
Name [ TEXT ]

match_season :
Season [ INT ] primary_key
Player [ TEXT ]
Position [ TEXT ]
Country [ INT ] match_season.Country = country.Country_id
Team [ INT ] match_season.Team = team.Team_id
Draft_Pick_Number [ INT ]
Draft_Class [ TEXT ]
College [ TEXT ]

player :
Player_ID [ INT ] primary_key
Player [ TEXT ]
Years_Played [ TEXT ]
Total_WL [ TEXT ]
Singles_WL [ TEXT ]
Doubles_WL [ TEXT ]
Team [ INT ] player.Team = team.Team_id

Please write me a SQL statement that answers the following question: Show the position of players and the corresponding number of players. [/INST]

Output: SELECT POSITION ,  COUNT(*) FROM match_season GROUP BY POSITION;


Input:
[INST] Here is a database schema:
country :
Country_id [ INT ] primary_key
Country_name [ TEXT ]
Capital [ TEXT ]
Official_native_language [ TEXT ]

team :
Team_id [ INT ] primary_key
Name [ TEXT ]

match_season :
Season [ INT ] primary_key
Player [ TEXT ]
Position [ TEXT ]
Country [ INT ] match_season.Country = country.Country_id
Team [ INT ] match_season.Team = team.Team_id
Draft_Pick_Number [ INT ]
Draft_Class [ TEXT ]
College [ TEXT ]

player :
Player_ID [ INT ] primary_key
Player [ TEXT ]
Years_Played [ TEXT ]
Total_WL [ TEXT ]
Singles_WL [ TEXT ]
Doubles_WL [ TEXT ]
Team [ INT ] player.Team = team.Team_id

Please write me a SQL statement that answers the following question: How many players played each position? [/INST]

Output: SELECT POSITION ,  COUNT(*) FROM match_season GROUP BY POSITION;


Input:
[INST] Here is a database schema:
country :
Country_id [ INT ] primary_key
Country_name [ TEXT ]
Capital [ TEXT ]
Official_native_language [ TEXT ]

team :
Team_id [ INT ] primary_key
Name [ TEXT ]

match_season :
Season [ INT ] primary_key
Player [ TEXT ]
Position [ TEXT ]
Country [ INT ] match_season.Country = country.Country_id
Team [ INT ] match_season.Team = team.Team_id
Draft_Pick_Number [ INT ]
Draft_Class [ TEXT ]
College [ TEXT ]

player :
Player_ID [ INT ] primary_key
Player [ TEXT ]
Years_Played [ TEXT ]
Total_WL [ TEXT ]
Singles_WL [ TEXT ]
Doubles_WL [ TEXT ]
Team [ INT ] player.Team = team.Team_id

Please write me a SQL statement that answers the following question: Show the country names and the corresponding number of players. [/INST]

Output: SELECT Country_name ,  COUNT(*) FROM country AS T1 JOIN match_season AS T2 ON T1.Country_id  =  T2.Country GROUP BY T1.Country_name;


Input:
[INST] Here is a database schema:
country :
Country_id [ INT ] primary_key
Country_name [ TEXT ]
Capital [ TEXT ]
Official_native_language [ TEXT ]

team :
Team_id [ INT ] primary_key
Name [ TEXT ]

match_season :
Season [ INT ] primary_key
Player [ TEXT ]
Position [ TEXT ]
Country [ INT ] match_season.Country = country.Country_id
Team [ INT ] match_season.Team = team.Team_id
Draft_Pick_Number [ INT ]
Draft_Class [ TEXT ]
College [ TEXT ]

player :
Player_ID [ INT ] primary_key
Player [ TEXT ]
Years_Played [ TEXT ]
Total_WL [ TEXT ]
Singles_WL [ TEXT ]
Doubles_WL [ TEXT ]
Team [ INT ] player.Team = team.Team_id

Please write me a SQL statement that answers the following question: How many players are from each country? [/INST]

Output: SELECT Country_name ,  COUNT(*) FROM country AS T1 JOIN match_season AS T2 ON T1.Country_id  =  T2.Country GROUP BY T1.Country_name;


Input:
[INST] Here is a database schema:
country :
Country_id [ INT ] primary_key
Country_name [ TEXT ]
Capital [ TEXT ]
Official_native_language [ TEXT ]

team :
Team_id [ INT ] primary_key
Name [ TEXT ]

match_season :
Season [ INT ] primary_key
Player [ TEXT ]
Position [ TEXT ]
Country [ INT ] match_season.Country = country.Country_id
Team [ INT ] match_season.Team = team.Team_id
Draft_Pick_Number [ INT ]
Draft_Class [ TEXT ]
College [ TEXT ]

player :
Player_ID [ INT ] primary_key
Player [ TEXT ]
Years_Played [ TEXT ]
Total_WL [ TEXT ]
Singles_WL [ TEXT ]
Doubles_WL [ TEXT ]
Team [ INT ] player.Team = team.Team_id

Please write me a SQL statement that answers the following question: Return all players sorted by college in ascending alphabetical order. [/INST]

Output: SELECT player FROM match_season ORDER BY College ASC;


Input:
[INST] Here is a database schema:
country :
Country_id [ INT ] primary_key
Country_name [ TEXT ]
Capital [ TEXT ]
Official_native_language [ TEXT ]

team :
Team_id [ INT ] primary_key
Name [ TEXT ]

match_season :
Season [ INT ] primary_key
Player [ TEXT ]
Position [ TEXT ]
Country [ INT ] match_season.Country = country.Country_id
Team [ INT ] match_season.Team = team.Team_id
Draft_Pick_Number [ INT ]
Draft_Class [ TEXT ]
College [ TEXT ]

player :
Player_ID [ INT ] primary_key
Player [ TEXT ]
Years_Played [ TEXT ]
Total_WL [ TEXT ]
Singles_WL [ TEXT ]
Doubles_WL [ TEXT ]
Team [ INT ] player.Team = team.Team_id

Please write me a SQL statement that answers the following question: What are all the players who played in match season, sorted by college in ascending alphabetical order? [/INST]

Output: SELECT player FROM match_season ORDER BY College ASC;