text
stringlengths
411
1.74k
<s>[INST] <<SYS>> You are an expert in SQL and data analysis. Given the table structure described by the CREATE TABLE statement, write an SQL query that provides the solution to the question. <</SYS>> CREATE TABLE statement: CREATE TABLE "nomenclature_of_t3_ss_proteins" ( "function_genus" text, "shigella" text, "salmonella" text, "yersinia" text, "escherichia" text );. Question: "What is the total count of distinct 'salmonella' and 'shigella' where 'escherichia' is 'EspD', ordered by 'function_genus' and limited to top 5 results.". [/INST] SELECT "function_genus", COUNT(DISTINCT "salmonella"), COUNT(DISTINCT "shigella") FROM "nomenclature_of_t3_ss_proteins" WHERE "escherichia"='EspD' GROUP BY "function_genus" ORDER BY "function_genus" LIMIT 5;</s>
<s>[INST] <<SYS>> You are an expert in SQL and data analysis. Given the table structure described by the CREATE TABLE statement, write an SQL query that provides the solution to the question. <</SYS>> CREATE TABLE statement: CREATE TABLE "nomenclature_of_t3_ss_proteins" ( "function_genus" text, "shigella" text, "salmonella" text, "yersinia" text, "escherichia" text );. Question: "How many distinct functions per genus exists where shigella is 'Spa32', ordered by the count in descending order, and only show the top 5?". [/INST] SELECT "function_genus", COUNT(DISTINCT "shigella") FROM "nomenclature_of_t3_ss_proteins" WHERE "shigella"='Spa32' GROUP BY "function_genus" ORDER BY COUNT(DISTINCT "shigella") DESC LIMIT 5;</s>
<s>[INST] <<SYS>> You are an expert in SQL and data analysis. Given the table structure described by the CREATE TABLE statement, write an SQL query that provides the solution to the question. <</SYS>> CREATE TABLE statement: CREATE TABLE "nomenclature_of_t3_ss_proteins" ( "function_genus" text, "shigella" text, "salmonella" text, "yersinia" text, "escherichia" text );. Question: "What are the top 5 distinct functions for "salmonella" where "shigella" is 'IpgC', ordered by the frequency of their occurrences?". [/INST] SELECT "function_genus", COUNT("salmonella") as frequency FROM "nomenclature_of_t3_ss_proteins" WHERE "shigella"='IpgC' GROUP BY "function_genus" ORDER BY frequency DESC LIMIT 5;</s>
<s>[INST] <<SYS>> You are an expert in SQL and data analysis. Given the table structure described by the CREATE TABLE statement, write an SQL query that provides the solution to the question. <</SYS>> CREATE TABLE statement: CREATE TABLE "nomenclature_of_t3_ss_proteins" ( "function_genus" text, "shigella" text, "salmonella" text, "yersinia" text, "escherichia" text );. Question: "Count the distinct functions of the genus for each unique combination where escherichia is 'SepB (EscN)' and order them in descending order by the count of distinct salmonella types.". [/INST] SELECT "function_genus", COUNT(DISTINCT "salmonella") FROM "nomenclature_of_t3_ss_proteins" WHERE "escherichia"='SepB (EscN)' GROUP BY "function_genus" ORDER BY COUNT(DISTINCT "salmonella") DESC;</s>
<s>[INST] <<SYS>> You are an expert in SQL and data analysis. Given the table structure described by the CREATE TABLE statement, write an SQL query that provides the solution to the question. <</SYS>> CREATE TABLE statement: CREATE TABLE "nomenclature_of_t3_ss_proteins" ( "function_genus" text, "shigella" text, "salmonella" text, "yersinia" text, "escherichia" text );. Question: "What's the most frequent 'shigella' function associated with 'yersinia' being 'YscP', and how many 'salmonella' and 'escherichia' are related to this 'shigella' function?". [/INST] SELECT "shigella", COUNT("shigella"), COUNT("salmonella"), COUNT("escherichia") FROM "nomenclature_of_t3_ss_proteins" WHERE "yersinia"='YscP' GROUP BY "shigella" ORDER BY COUNT("shigella") DESC LIMIT 1;</s>
<s>[INST] <<SYS>> You are an expert in SQL and data analysis. Given the table structure described by the CREATE TABLE statement, write an SQL query that provides the solution to the question. <</SYS>> CREATE TABLE statement: CREATE TABLE "table1_10321805_1" ( "year_ceremony" text, "film_title_used_in_nomination" text, "original_title" text, "director" text, "result" text );. Question: "What is the maximum number of distinct original titles per director for the movie 'Marriage Italian-Style', ordered by the director's name in ascending order and limit the result to the top 5?". [/INST] SELECT "director", COUNT(DISTINCT "original_title") FROM "table1_10321805_1" WHERE "film_title_used_in_nomination"='Marriage Italian-Style' GROUP BY "director" ORDER BY "director" ASC LIMIT 5;</s>
<s>[INST] <<SYS>> You are an expert in SQL and data analysis. Given the table structure described by the CREATE TABLE statement, write an SQL query that provides the solution to the question. <</SYS>> CREATE TABLE statement: CREATE TABLE "table1_10321805_1" ( "year_ceremony" text, "film_title_used_in_nomination" text, "original_title" text, "director" text, "result" text );. Question: "How many films were nominated each year for which the director of the movie with the original title 'La leggenda del santo bevitore' was also the director, sorted by years in descending order with a limitation of 10 entries.". [/INST] SELECT "year_ceremony", COUNT("film_title_used_in_nomination") FROM "table1_10321805_1" WHERE "director" IN (SELECT "director" FROM "table1_10321805_1" WHERE "original_title"='La leggenda del santo bevitore') GROUP BY "year_ceremony" ORDER BY "year_ceremony" DESC LIMIT 10;</s>
<s>[INST] <<SYS>> You are an expert in SQL and data analysis. Given the table structure described by the CREATE TABLE statement, write an SQL query that provides the solution to the question. <</SYS>> CREATE TABLE statement: CREATE TABLE "table1_10335_1" ( "camp" text, "estimated_deaths" text, "operational" text, "occupied_territory" text, "current_country_of_location" text, "primary_means_for_mass_killings" text );. Question: "What are the current countries of location of the camps where the estimated deaths exceed 600,000, and how many such camps are operational in each of these countries, ordered descendingly by the count of operational camps?". [/INST] SELECT "current_country_of_location", COUNT("operational") FROM "table1_10335_1" WHERE "estimated_deaths" > '600,000' AND "operational"='yes' GROUP BY "current_country_of_location" ORDER BY COUNT("operational") DESC;</s>
<s>[INST] <<SYS>> You are an expert in SQL and data analysis. Given the table structure described by the CREATE TABLE statement, write an SQL query that provides the solution to the question. <</SYS>> CREATE TABLE statement: CREATE TABLE "table1_10335_1" ( "camp" text, "estimated_deaths" text, "operational" text, "occupied_territory" text, "current_country_of_location" text, "primary_means_for_mass_killings" text );. Question: "What is the count of different means used for mass killings at each operational period for the camp 'Sajmište', ordered by the count in descending order?". [/INST] SELECT "operational", COUNT(DISTINCT "primary_means_for_mass_killings") AS "method_count" FROM "table1_10335_1" WHERE "camp"='Sajmište' GROUP BY "operational" ORDER BY "method_count" DESC;</s>
<s>[INST] <<SYS>> You are an expert in SQL and data analysis. Given the table structure described by the CREATE TABLE statement, write an SQL query that provides the solution to the question. <</SYS>> CREATE TABLE statement: CREATE TABLE "table1_10335_1" ( "camp" text, "estimated_deaths" text, "operational" text, "occupied_territory" text, "current_country_of_location" text, "primary_means_for_mass_killings" text );. Question: "What's the maximum and minimum estimated deaths for each occupied territory with operational period starting from 17 March 1942 to the end of June 1943 and also mention the associated primary means for mass killings and the current country of location?". [/INST] SELECT "occupied_territory", MAX("estimated_deaths"), MIN("estimated_deaths"), "primary_means_for_mass_killings", "current_country_of_location" FROM "table1_10335_1" WHERE "operational" LIKE '17 March 1942%' GROUP BY "occupied_territory","primary_means_for_mass_killings", "current_country_of_location" ORDER BY "occupied_territory" ASC LIMIT 10;</s>
<s>[INST] <<SYS>> You are an expert in SQL and data analysis. Given the table structure described by the CREATE TABLE statement, write an SQL query that provides the solution to the question. <</SYS>> CREATE TABLE statement: CREATE TABLE "table1_10335_1" ( "camp" text, "estimated_deaths" text, "operational" text, "occupied_territory" text, "current_country_of_location" text, "primary_means_for_mass_killings" text );. Question: "What is the total estimated deaths in each current country of location where the operational period was Summer of 1941 to 28 June 1944, and what was the primary means for mass killings used in these locations? List the results ordered by the number of estimated deaths in descending order, limiting to top 10 results.". [/INST] SELECT "current_country_of_location", SUM("estimated_deaths"), "primary_means_for_mass_killings" FROM "table1_10335_1" WHERE "operational"='Summer of 1941 to 28 June 1944' GROUP BY "current_country_of_location", "primary_means_for_mass_killings" ORDER BY SUM("estimated_deaths") DESC LIMIT 10;</s>
<s>[INST] <<SYS>> You are an expert in SQL and data analysis. Given the table structure described by the CREATE TABLE statement, write an SQL query that provides the solution to the question. <</SYS>> CREATE TABLE statement: CREATE TABLE "table1_10335_1" ( "camp" text, "estimated_deaths" text, "operational" text, "occupied_territory" text, "current_country_of_location" text, "primary_means_for_mass_killings" text );. Question: "What is the highest number of estimated deaths and the respective occupied territory from the top 5 occupied territories with the highest sum of estimated deaths?". [/INST] SELECT occupied_teritory, MAX(estimated_deaths) FROM (SELECT "occupied_territory", SUM("estimated_deaths") as estimated_deaths FROM "table1_10335_1" GROUP BY "occupied_territory" ORDER BY estimated_deaths DESC LIMIT 5) t;</s>
<s>[INST] <<SYS>> You are an expert in SQL and data analysis. Given the table structure described by the CREATE TABLE statement, write an SQL query that provides the solution to the question. <</SYS>> CREATE TABLE statement: CREATE TABLE "table1_10335_1" ( "camp" text, "estimated_deaths" text, "operational" text, "occupied_territory" text, "current_country_of_location" text, "primary_means_for_mass_killings" text );. Question: "What is the count of different camps carried out for each occupied territory with an operational period of May 1940 - January 1945, providing the camp with maximum estimated deaths? Also, sort the result by estimated deaths in descending order and limit to 5 rows for readability.". [/INST] SELECT "occupied_territory", COUNT("camp"), MAX("estimated_deaths") AS max_deaths FROM "table1_10335_1" WHERE "operational"='May 1940 – January 1945' GROUP BY "occupied_territory" ORDER BY max_deaths DESC LIMIT 5;</s>
<s>[INST] <<SYS>> You are an expert in SQL and data analysis. Given the table structure described by the CREATE TABLE statement, write an SQL query that provides the solution to the question. <</SYS>> CREATE TABLE statement: CREATE TABLE "table1_10360823_1" ( "round" real, "choice" real, "overall" real, "player_name" text, "position" text, "college" text );. Question: "What is the average overall pick number that was traded to the Cleveland Browns, grouped by the players' positions and ordered in descending order by the average pick number?". [/INST] SELECT "position", AVG("overall") FROM "table1_10360823_1" WHERE "college"='Traded to the Cleveland Browns' GROUP BY "position" ORDER BY AVG("overall") DESC;</s>
<s>[INST] <<SYS>> You are an expert in SQL and data analysis. Given the table structure described by the CREATE TABLE statement, write an SQL query that provides the solution to the question. <</SYS>> CREATE TABLE statement: CREATE TABLE "table1_10360823_1" ( "round" real, "choice" real, "overall" real, "player_name" text, "position" text, "college" text );. Question: "What was the maximum, minimum, and average round number for each college where an overall pick of 240 or less occurred, and order the results by the average round in ascending order and limit the result to the top 5 colleges.". [/INST] SELECT "college", MAX("round"), MIN("round"), AVG("round") FROM "table1_10360823_1" WHERE "overall"<=240 GROUP BY "college" ORDER BY AVG("round") ASC LIMIT 5;</s>
<s>[INST] <<SYS>> You are an expert in SQL and data analysis. Given the table structure described by the CREATE TABLE statement, write an SQL query that provides the solution to the question. <</SYS>> CREATE TABLE statement: CREATE TABLE "table1_10360823_1" ( "round" real, "choice" real, "overall" real, "player_name" text, "position" text, "college" text );. Question: "What is the highest, lowest, and average overall pick number for each position category of players who went to college at Youngstown State, and how many players represent each position? Limit the results to top 5 positions with the highest average overall pick.". [/INST] SELECT "position", MAX("overall"), MIN("overall"), AVG("overall"), COUNT("player_name") AS player_count FROM "table1_10360823_1" WHERE "college"='Youngstown State' GROUP BY "position" ORDER BY AVG("overall") DESC LIMIT 5;</s>
<s>[INST] <<SYS>> You are an expert in SQL and data analysis. Given the table structure described by the CREATE TABLE statement, write an SQL query that provides the solution to the question. <</SYS>> CREATE TABLE statement: CREATE TABLE "table1_10360823_1" ( "round" real, "choice" real, "overall" real, "player_name" text, "position" text, "college" text );. Question: "How many players were picked for each position from each college in round 7?". [/INST] SELECT "position", "college", COUNT("player_name") FROM "table1_10360823_1" WHERE "round"=7 GROUP BY "position", "college" ORDER BY COUNT("player_name") DESC;</s>
<s>[INST] <<SYS>> You are an expert in SQL and data analysis. Given the table structure described by the CREATE TABLE statement, write an SQL query that provides the solution to the question. <</SYS>> CREATE TABLE statement: CREATE TABLE "table1_10360823_1" ( "round" real, "choice" real, "overall" real, "player_name" text, "position" text, "college" text );. Question: "List the top 5 colleges supplying the highest number of players chosen in round 17, sorted alphabetically.". [/INST] SELECT "college", COUNT("player_name") as player_count FROM "table1_10360823_1" WHERE "round"=17 GROUP BY "college" ORDER BY player_count DESC, "college" ASC LIMIT 5;</s>
<s>[INST] <<SYS>> You are an expert in SQL and data analysis. Given the table structure described by the CREATE TABLE statement, write an SQL query that provides the solution to the question. <</SYS>> CREATE TABLE statement: CREATE TABLE "schedule" ( "game" real, "date" text, "opponent" text, "result" text, "vikings_points" real, "opponents" real, "record" text, "attendance" real );. Question: "What is the game with the largest attendance and its date when the record is 7-3?". [/INST] SELECT "game", "date", MAX("attendance") FROM "schedule" WHERE "record"='7-3' GROUP BY "game", "date" ORDER BY "attendance" DESC LIMIT 1;</s>
<s>[INST] <<SYS>> You are an expert in SQL and data analysis. Given the table structure described by the CREATE TABLE statement, write an SQL query that provides the solution to the question. <</SYS>> CREATE TABLE statement: CREATE TABLE "schedule" ( "game" real, "date" text, "opponent" text, "result" text, "vikings_points" real, "opponents" real, "record" text, "attendance" real );. Question: "Which opponent has the maximum 'vikings_points' when the record was 9-4 and list the top 5 'vikings_points' scored in descending order alongside their respective attendance.". [/INST] SELECT "opponent", "vikings_points", "attendance" FROM "schedule" WHERE "record"='9-4' ORDER BY "vikings_points" DESC LIMIT 5;</s>
<s>[INST] <<SYS>> You are an expert in SQL and data analysis. Given the table structure described by the CREATE TABLE statement, write an SQL query that provides the solution to the question. <</SYS>> CREATE TABLE statement: CREATE TABLE "schedule" ( "game" real, "date" text, "opponent" text, "result" text, "vikings_points" real, "opponents" real, "record" text, "attendance" real );. Question: "What was the average attendance and the maximum and minimum points our team scored grouped by opponent in games with a game number less than 8, ordered by the average attendance in a descending order and capped to 5 results?". [/INST] SELECT "opponent", AVG("attendance"), MAX("vikings_points"), MIN("vikings_points") FROM "schedule" WHERE "game" < 8 GROUP BY "opponent" ORDER BY AVG("attendance") DESC LIMIT 5;</s>
<s>[INST] <<SYS>> You are an expert in SQL and data analysis. Given the table structure described by the CREATE TABLE statement, write an SQL query that provides the solution to the question. <</SYS>> CREATE TABLE statement: CREATE TABLE "table1_10360656_1" ( "round" real, "choice" real, "overall" real, "player_name" text, "position" text, "college" text );. Question: "In what round Steve Stonebreaker was drafted, considering only the highest draft round per college where he studied?". [/INST] SELECT MAX("round") FROM "table1_10360656_1" WHERE "player_name"='Steve Stonebreaker' GROUP BY "college";</s>
<s>[INST] <<SYS>> You are an expert in SQL and data analysis. Given the table structure described by the CREATE TABLE statement, write an SQL query that provides the solution to the question. <</SYS>> CREATE TABLE statement: CREATE TABLE "table1_10360656_1" ( "round" real, "choice" real, "overall" real, "player_name" text, "position" text, "college" text );. Question: "What's the average pick per round for the top five players from each college in the draft?". [/INST] SELECT AVG("choice") FROM "table1_10360656_1" GROUP BY "college", "round" ORDER BY "choice" LIMIT 5;</s>
<s>[INST] <<SYS>> You are an expert in SQL and data analysis. Given the table structure described by the CREATE TABLE statement, write an SQL query that provides the solution to the question. <</SYS>> CREATE TABLE statement: CREATE TABLE "table1_10360656_1" ( "round" real, "choice" real, "overall" real, "player_name" text, "position" text, "college" text );. Question: "In which round and overall position was Bill Hill drafted and which is the most common college of these drafted players?". [/INST] SELECT "round", "overall", "college", COUNT(*) as frequency FROM "table1_10360656_1" WHERE "player_name"='Bill Hill' GROUP BY "college" ORDER BY frequency DESC LIMIT 1;</s>
<s>[INST] <<SYS>> You are an expert in SQL and data analysis. Given the table structure described by the CREATE TABLE statement, write an SQL query that provides the solution to the question. <</SYS>> CREATE TABLE statement: CREATE TABLE "table1_10360656_1" ( "round" real, "choice" real, "overall" real, "player_name" text, "position" text, "college" text );. Question: "What is the average draft round of quarterbacks per each college and sort the result based on the average round in ascending order? Also, show only top 10 colleges.". [/INST] SELECT "college", AVG("round") as Avg_Round FROM "table1_10360656_1" WHERE "position"='Quarterback' GROUP BY "college" ORDER BY Avg_Round ASC LIMIT 10;</s>
<s>[INST] <<SYS>> You are an expert in SQL and data analysis. Given the table structure described by the CREATE TABLE statement, write an SQL query that provides the solution to the question. <</SYS>> CREATE TABLE statement: CREATE TABLE "table1_10361625_1" ( "round" real, "choice" real, "overall" real, "player_name" text, "position" text, "college" text );. Question: "How many players from the college where Keith Hartwig plays were chosen for each round, and what is the average overall score per round? Additionally, how should the results be arranged?". [/INST] SELECT "round", COUNT("player_name"), AVG("overall") FROM "table1_10361625_1" WHERE "college"=(SELECT "college" FROM "table1_10361625_1" WHERE "player_name"='Keith Hartwig') GROUP BY "round" ORDER BY "round";</s>
<s>[INST] <<SYS>> You are an expert in SQL and data analysis. Given the table structure described by the CREATE TABLE statement, write an SQL query that provides the solution to the question. <</SYS>> CREATE TABLE statement: CREATE TABLE "table1_10361625_1" ( "round" real, "choice" real, "overall" real, "player_name" text, "position" text, "college" text );. Question: "What is the average round per position, for players enrolled in Illinois college, sorted by round in descending order? Limit the results to 5.". [/INST] SELECT "position", AVG("round") FROM "table1_10361625_1" WHERE "college"='Illinois' GROUP BY "position" ORDER BY AVG("round") DESC LIMIT 5;</s>
<s>[INST] <<SYS>> You are an expert in SQL and data analysis. Given the table structure described by the CREATE TABLE statement, write an SQL query that provides the solution to the question. <</SYS>> CREATE TABLE statement: CREATE TABLE "table1_10361625_1" ( "round" real, "choice" real, "overall" real, "player_name" text, "position" text, "college" text );. Question: "What is the greatest round for each position where overall is 83, and who are the players in these positions?". [/INST] SELECT "position", MAX("round"), "player_name" FROM "table1_10361625_1" WHERE "overall"=83 GROUP BY "position";</s>
<s>[INST] <<SYS>> You are an expert in SQL and data analysis. Given the table structure described by the CREATE TABLE statement, write an SQL query that provides the solution to the question. <</SYS>> CREATE TABLE statement: CREATE TABLE "table1_10361625_1" ( "round" real, "choice" real, "overall" real, "player_name" text, "position" text, "college" text );. Question: "In which round did Tommy Kramer play most of the time, and how many times did he play in that round?". [/INST] SELECT "round", COUNT(*) as times_played FROM "table1_10361625_1" WHERE "player_name"='Tommy Kramer' GROUP BY "round" ORDER BY times_played DESC LIMIT 1;</s>
<s>[INST] <<SYS>> You are an expert in SQL and data analysis. Given the table structure described by the CREATE TABLE statement, write an SQL query that provides the solution to the question. <</SYS>> CREATE TABLE statement: CREATE TABLE "table1_10361625_1" ( "round" real, "choice" real, "overall" real, "player_name" text, "position" text, "college" text );. Question: "What is the average, maximum, and minimum score of Rice college across different positions and list them in descending order by average score with a limit of top 5 positions.". [/INST] SELECT "position", AVG("overall") AS Avg_Score, MAX("overall") AS Max_Score, MIN("overall") AS Min_Score FROM "table1_10361625_1" WHERE "college"='Rice' GROUP BY "position" ORDER BY AVG("overall") DESC LIMIT 5;</s>
<s>[INST] <<SYS>> You are an expert in SQL and data analysis. Given the table structure described by the CREATE TABLE statement, write an SQL query that provides the solution to the question. <</SYS>> CREATE TABLE statement: CREATE TABLE "table1_10361230_1" ( "round" real, "choice" real, "overall" real, "player_name" text, "position" text, "college" text );. Question: "What is the highest, lowest and average overall ranking of players for each position appearing in the first round?". [/INST] SELECT "position", MAX("overall"), MIN("overall"), AVG("overall") FROM "table1_10361230_1" WHERE "round"=1 GROUP BY "position";</s>
<s>[INST] <<SYS>> You are an expert in SQL and data analysis. Given the table structure described by the CREATE TABLE statement, write an SQL query that provides the solution to the question. <</SYS>> CREATE TABLE statement: CREATE TABLE "table1_10361230_1" ( "round" real, "choice" real, "overall" real, "player_name" text, "position" text, "college" text );. Question: "What is the average overall score for each player, listing only the top five scores from players with the same college as Bruce Cerone, ordered in descending order?". [/INST] SELECT "player_name", AVG("overall") AS avgOverall FROM "table1_10361230_1" WHERE "college"=(SELECT "college" FROM "table1_10361230_1" WHERE "player_name"='Bruce Cerone') GROUP BY "player_name" ORDER BY avgOverall DESC LIMIT 5;</s>
<s>[INST] <<SYS>> You are an expert in SQL and data analysis. Given the table structure described by the CREATE TABLE statement, write an SQL query that provides the solution to the question. <</SYS>> CREATE TABLE statement: CREATE TABLE "table1_10361230_1" ( "round" real, "choice" real, "overall" real, "player_name" text, "position" text, "college" text );. Question: "What is the maximum, minimum, and average, round number, and how many times they played for the top five players who went to Emporia State, ordered by the round number?". [/INST] SELECT "player_name", MAX("round"), MIN("round"), AVG("round"), COUNT("player_name") FROM "table1_10361230_1" WHERE "college"='Emporia State' GROUP BY "player_name" ORDER BY "round" LIMIT 5;</s>
<s>[INST] <<SYS>> You are an expert in SQL and data analysis. Given the table structure described by the CREATE TABLE statement, write an SQL query that provides the solution to the question. <</SYS>> CREATE TABLE statement: CREATE TABLE "table1_10361230_1" ( "round" real, "choice" real, "overall" real, "player_name" text, "position" text, "college" text );. Question: "What is the highest choice for each position, and which player had that choice? Limit the results to top 5 chosen first in descending order of their choice.". [/INST] SELECT MAX("choice"), "position", "player_name" FROM "table1_10361230_1" GROUP BY "position", "player_name" ORDER BY MAX("choice") DESC LIMIT 5;</s>
<s>[INST] <<SYS>> You are an expert in SQL and data analysis. Given the table structure described by the CREATE TABLE statement, write an SQL query that provides the solution to the question. <</SYS>> CREATE TABLE statement: CREATE TABLE "table1_10361230_1" ( "round" real, "choice" real, "overall" real, "player_name" text, "position" text, "college" text );. Question: "What are the top 3 positions most frequently held by players from the same college as Bill Cappleman, and how many players hold each of these positions?". [/INST] SELECT "position", COUNT("player_name") FROM "table1_10361230_1" WHERE "college"=(SELECT "college" FROM "table1_10361230_1" WHERE "player_name"='Bill Cappleman') GROUP BY "position" ORDER BY COUNT("player_name") DESC LIMIT 3;</s>
<s>[INST] <<SYS>> You are an expert in SQL and data analysis. Given the table structure described by the CREATE TABLE statement, write an SQL query that provides the solution to the question. <</SYS>> CREATE TABLE statement: CREATE TABLE "headstamps_and_colour_coding" ( "headstamp_id" text, "primer_annulus_color" text, "bullet_tip_color" text, "other_features" text, "functional_type" text );. Question: "What is the most common color used for the bullet tip for each functional type, for the first ten records sorted by headstamp id for the headstamp id that starts with 'H'?". [/INST] SELECT "functional_type", "bullet_tip_color", COUNT("bullet_tip_color") AS "color_count" FROM "headstamps_and_colour_coding" WHERE "headstamp_id" LIKE 'H%' GROUP BY "functional_type", "bullet_tip_color" ORDER BY "functional_type", "color_count" DESC LIMIT 10;</s>
<s>[INST] <<SYS>> You are an expert in SQL and data analysis. Given the table structure described by the CREATE TABLE statement, write an SQL query that provides the solution to the question. <</SYS>> CREATE TABLE statement: CREATE TABLE "headstamps_and_colour_coding" ( "headstamp_id" text, "primer_annulus_color" text, "bullet_tip_color" text, "other_features" text, "functional_type" text );. Question: "For each functional type, what is the most frequently observed other feature for headstamps with a light ball bullet tip color?". [/INST] SELECT "functional_type", "other_features", COUNT(*) AS "frequency" FROM "headstamps_and_colour_coding" WHERE "bullet_tip_color"='Light Ball' GROUP BY "functional_type", "other_features" ORDER BY "frequency" DESC LIMIT 1;</s>
<s>[INST] <<SYS>> You are an expert in SQL and data analysis. Given the table structure described by the CREATE TABLE statement, write an SQL query that provides the solution to the question. <</SYS>> CREATE TABLE statement: CREATE TABLE "headstamps_and_colour_coding" ( "headstamp_id" text, "primer_annulus_color" text, "bullet_tip_color" text, "other_features" text, "functional_type" text );. Question: "What are the unique primers annulus colors, and how many instances of each exist when the color of the bullet tip was white, sorted in descending order of instances?". [/INST] SELECT "primer_annulus_color", COUNT(*) FROM "headstamps_and_colour_coding" WHERE "bullet_tip_color"='White' GROUP BY "primer_annulus_color" ORDER BY COUNT(*) DESC;</s>
<s>[INST] <<SYS>> You are an expert in SQL and data analysis. Given the table structure described by the CREATE TABLE statement, write an SQL query that provides the solution to the question. <</SYS>> CREATE TABLE statement: CREATE TABLE "headstamps_and_colour_coding" ( "headstamp_id" text, "primer_annulus_color" text, "bullet_tip_color" text, "other_features" text, "functional_type" text );. Question: "What is the most common bullet tip color for each type of functional feature where other features include a blue band on case base, and how many instances of each combination are there?". [/INST] SELECT "functional_type", "bullet_tip_color", COUNT("bullet_tip_color") AS qty FROM "headstamps_and_colour_coding" WHERE "other_features"='Blue band on case base' GROUP BY "functional_type", "bullet_tip_color" ORDER BY qty DESC LIMIT 10;</s>
<s>[INST] <<SYS>> You are an expert in SQL and data analysis. Given the table structure described by the CREATE TABLE statement, write an SQL query that provides the solution to the question. <</SYS>> CREATE TABLE statement: CREATE TABLE "career_statistics" ( "year" real, "games" real, "games_started" real, "completions" real, "attempts" real, "completion_pct" text, "yards" real, "yards_attempt" text, "touchdowns" real, "interceptions" real, "rating" text );. Question: "What is the maximum number of games started in the years where the completion percentage was 56.0 and the minimum touchdowns were scored, ordered in descending order by the number of yards per game, limiting to the top 5?". [/INST] SELECT MAX("games_started") FROM "career_statistics" WHERE "completion_pct"='56.0' AND "touchdowns"=(SELECT MIN("touchdowns") FROM "career_statistics" WHERE "completion_pct"='56.0') GROUP BY "year" ORDER BY "yards" DESC LIMIT 5;</s>
<s>[INST] <<SYS>> You are an expert in SQL and data analysis. Given the table structure described by the CREATE TABLE statement, write an SQL query that provides the solution to the question. <</SYS>> CREATE TABLE statement: CREATE TABLE "career_statistics" ( "year" real, "games" real, "games_started" real, "completions" real, "attempts" real, "completion_pct" text, "yards" real, "yards_attempt" text, "touchdowns" real, "interceptions" real, "rating" text );. Question: "What is the maximum number of interceptions and the average rating per year for the five years with the highest number of completions, where at least 12 games were started?". [/INST] SELECT "year", MAX("interceptions"), AVG("rating") FROM "career_statistics" WHERE "games_started">=12 GROUP BY "year" ORDER BY "completions" DESC LIMIT 5;</s>
<s>[INST] <<SYS>> You are an expert in SQL and data analysis. Given the table structure described by the CREATE TABLE statement, write an SQL query that provides the solution to the question. <</SYS>> CREATE TABLE statement: CREATE TABLE "career_statistics" ( "year" real, "games" real, "games_started" real, "completions" real, "attempts" real, "completion_pct" text, "yards" real, "yards_attempt" text, "touchdowns" real, "interceptions" real, "rating" text );. Question: "What were the maximum and minimum touchdowns made every year, and their corresponding years, where the attempted games were more than 348, ordered by decreasing number of touchdowns, limited to top 5 rows?". [/INST] SELECT "year", MAX("touchdowns"), MIN("touchdowns") FROM "career_statistics" WHERE "attempts">348 GROUP BY "year" ORDER BY MAX("touchdowns") DESC LIMIT 5;</s>
<s>[INST] <<SYS>> You are an expert in SQL and data analysis. Given the table structure described by the CREATE TABLE statement, write an SQL query that provides the solution to the question. <</SYS>> CREATE TABLE statement: CREATE TABLE "table1_10402018_1" ( "character" text, "australia_new_zealand_sydney_first_run_melbourne_auckland" text, "london" text, "toronto_broadway" text, "brazil" text, "uk_tour" text, "us_tour" text, "italy_milan_rome_trieste" text );. Question: "What is the total number of Melbourne and Sydney appearances for each character played by Babs Rubenstein in UK and US tours?". [/INST] SELECT "character", COUNT("australia_new_zealand_sydney_first_run_melbourne_auckland") FROM "table1_10402018_1" WHERE ("us_tour"='Babs Rubenstein' OR "uk_tour"='Babs Rubenstein') GROUP BY "character";</s>
<s>[INST] <<SYS>> You are an expert in SQL and data analysis. Given the table structure described by the CREATE TABLE statement, write an SQL query that provides the solution to the question. <</SYS>> CREATE TABLE statement: CREATE TABLE "table1_10402018_1" ( "character" text, "australia_new_zealand_sydney_first_run_melbourne_auckland" text, "london" text, "toronto_broadway" text, "brazil" text, "uk_tour" text, "us_tour" text, "italy_milan_rome_trieste" text );. Question: "How many unique characters have has had a tour in Toronto/Broadway and didn't have a UK tour, and what's the maximum number of persons having the same character?". [/INST] SELECT "character", COUNT("character") as count FROM "table1_10402018_1" WHERE "uk_tour"='n/a' GROUP BY "character" ORDER BY count DESC LIMIT 1;</s>
<s>[INST] <<SYS>> You are an expert in SQL and data analysis. Given the table structure described by the CREATE TABLE statement, write an SQL query that provides the solution to the question. <</SYS>> CREATE TABLE statement: CREATE TABLE "table1_10402018_1" ( "character" text, "australia_new_zealand_sydney_first_run_melbourne_auckland" text, "london" text, "toronto_broadway" text, "brazil" text, "uk_tour" text, "us_tour" text, "italy_milan_rome_trieste" text );. Question: "How many distinct actors have played the character Frank in each region, and what is the maximum number of actors for any given region?". [/INST] SELECT "character", COUNT(DISTINCT "london"), COUNT(DISTINCT "toronto_broadway"), COUNT(DISTINCT "brazil"), COUNT(DISTINCT "uk_tour"), COUNT(DISTINCT "us_tour"), COUNT(DISTINCT "italy_milan_rome_trieste"), MAX(COUNT(DISTINCT "london"), COUNT(DISTINCT "toronto_broadway"), COUNT(DISTINCT "brazil"), COUNT(DISTINCT "uk_tour"), COUNT(DISTINCT "us_tour"), COUNT(DISTINCT "italy_milan_rome_trieste")) FROM "table1_10402018_1" WHERE "character"='Frank' GROUP BY "character";</s>
<s>[INST] <<SYS>> You are an expert in SQL and data analysis. Given the table structure described by the CREATE TABLE statement, write an SQL query that provides the solution to the question. <</SYS>> CREATE TABLE statement: CREATE TABLE "team" ( "school_year" text, "class_a" text, "class_aa" text, "class_aaa" text, "class_aaaa" text, "class_aaaaa" text );. Question: "How many different class AAA champions have there been throughout the years, ordered by the most occurrences at the top and limit the results to the first 5?". [/INST] SELECT "class_aaa", COUNT("class_aaa") AS CountOfChampions FROM "team" GROUP BY "class_aaa" ORDER BY CountOfChampions DESC LIMIT 5;</s>
<s>[INST] <<SYS>> You are an expert in SQL and data analysis. Given the table structure described by the CREATE TABLE statement, write an SQL query that provides the solution to the question. <</SYS>> CREATE TABLE statement: CREATE TABLE "team" ( "school_year" text, "class_a" text, "class_aa" text, "class_aaa" text, "class_aaaa" text, "class_aaaaa" text );. Question: "Can you rank and provide the top 5 Class AAA teams that had the most recurring years when Class A diploma was awarded to either Apple Springs or Texline?". [/INST] SELECT "class_aaa", COUNT("school_year") FROM "team" WHERE "class_a" IN ('Apple Springs', 'Texline') GROUP BY "class_aaa" ORDER BY COUNT("school_year") DESC LIMIT 5;</s>
<s>[INST] <<SYS>> You are an expert in SQL and data analysis. Given the table structure described by the CREATE TABLE statement, write an SQL query that provides the solution to the question. <</SYS>> CREATE TABLE statement: CREATE TABLE "team" ( "school_year" text, "class_a" text, "class_aa" text, "class_aaa" text, "class_aaaa" text, "class_aaaaa" text );. Question: "During which school years did each class type have the highest number of occurrences?". [/INST] SELECT "school_year", MAX(COUNT("class_a")), MAX(COUNT("class_aa")), MAX(COUNT("class_aaa")), MAX(COUNT("class_aaaa")), MAX(COUNT("class_aaaaa")) FROM "team" GROUP BY "school_year" ORDER BY "school_year" DESC LIMIT 5;</s>
<s>[INST] <<SYS>> You are an expert in SQL and data analysis. Given the table structure described by the CREATE TABLE statement, write an SQL query that provides the solution to the question. <</SYS>> CREATE TABLE statement: CREATE TABLE "team" ( "school_year" text, "class_a" text, "class_aa" text, "class_aaa" text, "class_aaaa" text, "class_aaaaa" text );. Question: "During the years that Class AAAAA was Brownsville Pace, list the Class AAA teams grouped by school year, ordered by frequency in descending order.". [/INST] SELECT "class_aaa", COUNT(*) FROM "team" WHERE "class_aaaaa"='Brownsville Pace' GROUP BY "class_aaa", "school_year" ORDER BY COUNT(*) DESC;</s>
<s>[INST] <<SYS>> You are an expert in SQL and data analysis. Given the table structure described by the CREATE TABLE statement, write an SQL query that provides the solution to the question. <</SYS>> CREATE TABLE statement: CREATE TABLE "team" ( "school_year" text, "class_a" text, "class_aa" text, "class_aaa" text, "class_aaaa" text, "class_aaaaa" text );. Question: "What is the average number of distinct Class AA, AAA, AAAA, AAAAA per school year during the same year that Class AAA was White Oak?". [/INST] SELECT "school_year", COUNT(DISTINCT "class_aa"), COUNT(DISTINCT "class_aaa"), COUNT(DISTINCT "class_aaaa"), COUNT(DISTINCT "class_aaaaa") FROM "team" WHERE "class_aaa"='White Oak' GROUP BY "school_year";</s>
<s>[INST] <<SYS>> You are an expert in SQL and data analysis. Given the table structure described by the CREATE TABLE statement, write an SQL query that provides the solution to the question. <</SYS>> CREATE TABLE statement: CREATE TABLE "table1_10392906_2" ( "week" real, "date" text, "kickoff" text, "opponent" text, "final_score" text, "team_record" text, "game_site" text, "attendance" real );. Question: "How many records are listed per opponent on the top 5 dates with the highest attendance?". [/INST] SELECT COUNT("team_record"), "opponent" FROM "table1_10392906_2" GROUP BY "opponent", "date" ORDER BY "attendance" DESC LIMIT 5;</s>
<s>[INST] <<SYS>> You are an expert in SQL and data analysis. Given the table structure described by the CREATE TABLE statement, write an SQL query that provides the solution to the question. <</SYS>> CREATE TABLE statement: CREATE TABLE "table1_10392906_2" ( "week" real, "date" text, "kickoff" text, "opponent" text, "final_score" text, "team_record" text, "game_site" text, "attendance" real );. Question: "How many unique opponents did the team play against on each date of the week with a record of game attendance, ordering by the highest attendance to lowest for the top three attended games?". [/INST] SELECT "date", COUNT(DISTINCT "opponent"), MAX("attendance") FROM "table1_10392906_2" GROUP BY "date" ORDER BY MAX("attendance") DESC LIMIT 3;</s>
<s>[INST] <<SYS>> You are an expert in SQL and data analysis. Given the table structure described by the CREATE TABLE statement, write an SQL query that provides the solution to the question. <</SYS>> CREATE TABLE statement: CREATE TABLE "table1_10392906_2" ( "week" real, "date" text, "kickoff" text, "opponent" text, "final_score" text, "team_record" text, "game_site" text, "attendance" real );. Question: "Count the total attendance per week for all games held at the Commerzbank-Arena, order by week, and give the top 3 weeks with highest attendance.". [/INST] SELECT "week", SUM("attendance") AS "Total Attendance" FROM "table1_10392906_2" WHERE "game_site"='Commerzbank-Arena' GROUP BY "week" ORDER BY "Total Attendance" DESC LIMIT 3;</s>
<s>[INST] <<SYS>> You are an expert in SQL and data analysis. Given the table structure described by the CREATE TABLE statement, write an SQL query that provides the solution to the question. <</SYS>> CREATE TABLE statement: CREATE TABLE "table1_10413597_5" ( "no_in_series" real, "no_in_season" real, "title" text, "setting" text, "directed_by" text, "written_by" text, "u_s_viewers_million" text, "original_air_date" text );. Question: "What are the top 3 episodes with the highest viewers, their respective setting and original air date for episodes set in 1544?". [/INST] SELECT "u_s_viewers_million", "setting", "original_air_date" FROM "table1_10413597_5" WHERE "setting"='1544' ORDER BY "u_s_viewers_million" DESC LIMIT 3;</s>
<s>[INST] <<SYS>> You are an expert in SQL and data analysis. Given the table structure described by the CREATE TABLE statement, write an SQL query that provides the solution to the question. <</SYS>> CREATE TABLE statement: CREATE TABLE "table1_10413597_5" ( "no_in_series" real, "no_in_season" real, "title" text, "setting" text, "directed_by" text, "written_by" text, "u_s_viewers_million" text, "original_air_date" text );. Question: "What are the top 3 most common settings for the series ranked by the number of episodes directed by each director for the first 50 episodes?". [/INST] SELECT "setting", "directed_by", COUNT(*) FROM "table1_10413597_5" WHERE "no_in_series" <= 50 GROUP BY "setting", "directed_by" ORDER BY COUNT(*) DESC LIMIT 3;</s>
<s>[INST] <<SYS>> You are an expert in SQL and data analysis. Given the table structure described by the CREATE TABLE statement, write an SQL query that provides the solution to the question. <</SYS>> CREATE TABLE statement: CREATE TABLE "table1_10413597_5" ( "no_in_series" real, "no_in_season" real, "title" text, "setting" text, "directed_by" text, "written_by" text, "u_s_viewers_million" text, "original_air_date" text );. Question: "Count the number of episodes each writer has written that were set in Winter 1541/February 13, 1542, ordered by the number of episodes in descending order, and provide only the top 5.". [/INST] SELECT "written_by", COUNT(*) as episode_count FROM "table1_10413597_5" WHERE "setting"='Winter 1541/February 13, 1542' GROUP BY "written_by" ORDER BY episode_count DESC LIMIT 5;</s>
<s>[INST] <<SYS>> You are an expert in SQL and data analysis. Given the table structure described by the CREATE TABLE statement, write an SQL query that provides the solution to the question. <</SYS>> CREATE TABLE statement: CREATE TABLE "table1_10413597_4" ( "no_in_series" real, "no_in_season" real, "title" text, "setting" text, "directed_by" text, "written_by" text, "original_air_date" text );. Question: "Count the number of episodes directed by each director for the season where the episode "The Northern Uprising" was aired, and order it by number of episodes in descending order, listing the top 5". [/INST] SELECT "directed_by", COUNT("no_in_season") FROM "table1_10413597_4" WHERE "original_air_date" IN (SELECT "original_air_date" FROM "table1_10413597_4" WHERE "title"='\"The Northern Uprising\"') GROUP BY "directed_by" ORDER BY COUNT("no_in_season") DESC LIMIT 5;</s>
<s>[INST] <<SYS>> You are an expert in SQL and data analysis. Given the table structure described by the CREATE TABLE statement, write an SQL query that provides the solution to the question. <</SYS>> CREATE TABLE statement: CREATE TABLE "song_list" ( "date" text, "album_name" text, "track" text, "track_title" text, "lyricist" text, "music_genre_style" text, "major_instrument_s" text, "lyrics_theme_style" text, "duration" text );. Question: "What is the longest track's title, duration, and its lyricist's name, grouped by music_genre_style, sorted by duration in descending order, and show only top 5.". [/INST] SELECT "music_genre_style", MAX("duration"), "track_title", "lyricist" FROM "song_list" GROUP BY "music_genre_style" ORDER BY MAX("duration") DESC LIMIT 5;</s>
<s>[INST] <<SYS>> You are an expert in SQL and data analysis. Given the table structure described by the CREATE TABLE statement, write an SQL query that provides the solution to the question. <</SYS>> CREATE TABLE statement: CREATE TABLE "song_list" ( "date" text, "album_name" text, "track" text, "track_title" text, "lyricist" text, "music_genre_style" text, "major_instrument_s" text, "lyrics_theme_style" text, "duration" text );. Question: "What are the top 5 most frequent lyric theme styles along with the count for each theme in the album that includes the track "Sweetness 甜甜的 (Tián tián de)" considering only those themes that appear more than 3 times?". [/INST] SELECT "lyrics_theme_style", COUNT(*) as frequency FROM "song_list" WHERE "album_name" IN (SELECT "album_name" FROM "song_list" WHERE "track_title"='Sweetness 甜甜的 (Tián tián de)') GROUP BY "lyrics_theme_style" HAVING COUNT(*) > 3 ORDER BY frequency DESC LIMIT 5;</s>
<s>[INST] <<SYS>> You are an expert in SQL and data analysis. Given the table structure described by the CREATE TABLE statement, write an SQL query that provides the solution to the question. <</SYS>> CREATE TABLE statement: CREATE TABLE "song_list" ( "date" text, "album_name" text, "track" text, "track_title" text, "lyricist" text, "music_genre_style" text, "major_instrument_s" text, "lyrics_theme_style" text, "duration" text );. Question: "What is the longest and shortest duration of songs, as well as the average song duration, where the major instrument is the piano and the songs were recorded in 2004? Also, provide only the top 10 results ordered by average song duration in descending order.". [/INST] SELECT MAX("duration"), MIN("duration"), AVG("duration") FROM "song_list" WHERE "major_instrument_s"='Piano' AND "date" LIKE '2004%' GROUP BY "album_name" ORDER BY AVG("duration") DESC LIMIT 10;</s>
<s>[INST] <<SYS>> You are an expert in SQL and data analysis. Given the table structure described by the CREATE TABLE statement, write an SQL query that provides the solution to the question. <</SYS>> CREATE TABLE statement: CREATE TABLE "song_list" ( "date" text, "album_name" text, "track" text, "track_title" text, "lyricist" text, "music_genre_style" text, "major_instrument_s" text, "lyrics_theme_style" text, "duration" text );. Question: "What are the top 5 most common major instruments used in songs where the lyrics theme is romance, the song lasts for 3:50 and group them according to the different lyricists?". [/INST] SELECT "lyricist", "major_instrument_s", COUNT(*) FROM "song_list" WHERE "lyrics_theme_style"='Romance' AND "duration"='3:50' GROUP BY "lyricist", "major_instrument_s" ORDER BY COUNT(*) DESC LIMIT 5;</s>
<s>[INST] <<SYS>> You are an expert in SQL and data analysis. Given the table structure described by the CREATE TABLE statement, write an SQL query that provides the solution to the question. <</SYS>> CREATE TABLE statement: CREATE TABLE "song_list" ( "date" text, "album_name" text, "track" text, "track_title" text, "lyricist" text, "music_genre_style" text, "major_instrument_s" text, "lyrics_theme_style" text, "duration" text );. Question: "For each music genre, what are the top 5 longest tracks with their corresponding major instruments?". [/INST] SELECT "music_genre_style", "track", "major_instrument_s", MAX("duration") as maximum_duration FROM "song_list" GROUP BY "music_genre_style" ORDER BY maximum_duration DESC LIMIT 5;</s>
<s>[INST] <<SYS>> You are an expert in SQL and data analysis. Given the table structure described by the CREATE TABLE statement, write an SQL query that provides the solution to the question. <</SYS>> CREATE TABLE statement: CREATE TABLE "song_list" ( "date" text, "album_name" text, "track" text, "track_title" text, "lyricist" text, "music_genre_style" text, "major_instrument_s" text, "lyrics_theme_style" text, "duration" text );. Question: "What is the average number of detective story-themed songs per music genre/style, sorted by the number of songs in descending order, and only show the top 3 genres?". [/INST] SELECT "music_genre_style", AVG(COUNT("track")) FROM "song_list" WHERE "lyrics_theme_style"='Detective story' GROUP BY "music_genre_style" ORDER BY COUNT("track") DESC LIMIT 3;</s>
<s>[INST] <<SYS>> You are an expert in SQL and data analysis. Given the table structure described by the CREATE TABLE statement, write an SQL query that provides the solution to the question. <</SYS>> CREATE TABLE statement: CREATE TABLE "year_by_year" ( "year" real, "division" real, "league" text, "regular_season" text, "playoffs" text, "open_cup" text );. Question: "In which year did the USL Pro Select League division had the maximum playoffs, and also list the corresponding 'open_cup' results for the top 5 records ordered by year in descending order.". [/INST] SELECT MAX("year"), "playoffs", "open_cup" FROM "year_by_year" WHERE "league"='USL Pro Select League' GROUP BY "division" ORDER BY "year" DESC LIMIT 5;</s>
<s>[INST] <<SYS>> You are an expert in SQL and data analysis. Given the table structure described by the CREATE TABLE statement, write an SQL query that provides the solution to the question. <</SYS>> CREATE TABLE statement: CREATE TABLE "year_by_year" ( "year" real, "division" real, "league" text, "regular_season" text, "playoffs" text, "open_cup" text );. Question: "What is the number of occurrences for each division in the 1st round ordered by the number of occurrences in descending order and limit the result to the top 5?". [/INST] SELECT "division", COUNT("division") FROM "year_by_year" WHERE "open_cup"='1st Round' GROUP BY "division" ORDER BY COUNT("division") DESC LIMIT 5;</s>
<s>[INST] <<SYS>> You are an expert in SQL and data analysis. Given the table structure described by the CREATE TABLE statement, write an SQL query that provides the solution to the question. <</SYS>> CREATE TABLE statement: CREATE TABLE "career_summary" ( "season" text, "series" text, "team" text, "races" real, "wins" real, "poles" real, "f_laps" real, "podiums" real, "points" real, "position" text );. Question: "What are the top three teams with the highest total wins for the series 'Formula Renault 2.0 NEC', and how many wins does each team have?". [/INST] SELECT "team", SUM("wins") AS total_wins FROM "career_summary" WHERE "series"='Formula Renault 2.0 NEC' GROUP BY "team" ORDER BY total_wins DESC LIMIT 3;</s>
<s>[INST] <<SYS>> You are an expert in SQL and data analysis. Given the table structure described by the CREATE TABLE statement, write an SQL query that provides the solution to the question. <</SYS>> CREATE TABLE statement: CREATE TABLE "career_summary" ( "season" text, "series" text, "team" text, "races" real, "wins" real, "poles" real, "f_laps" real, "podiums" real, "points" real, "position" text );. Question: "What is the total number of poles won by Arden International for each series, ordered by series in ascending order, and limited to top 5 results?". [/INST] SELECT "series", COUNT("poles") from "career_summary" WHERE "team"='Arden International' GROUP BY "series" ORDER BY "series" ASC LIMIT 5;</s>
<s>[INST] <<SYS>> You are an expert in SQL and data analysis. Given the table structure described by the CREATE TABLE statement, write an SQL query that provides the solution to the question. <</SYS>> CREATE TABLE statement: CREATE TABLE "career_summary" ( "season" text, "series" text, "team" text, "races" real, "wins" real, "poles" real, "f_laps" real, "podiums" real, "points" real, "position" text );. Question: "What is the total number of wins and average points per season for the GP2 series for Racing Engineering, sorted by season in ascending order with a limit of 5 seasons?". [/INST] SELECT "season", SUM("wins"), AVG("points") FROM "career_summary" WHERE "series"='GP2 Series' AND "team"='Racing Engineering' GROUP BY "season" ORDER BY "season" ASC LIMIT 5;</s>
<s>[INST] <<SYS>> You are an expert in SQL and data analysis. Given the table structure described by the CREATE TABLE statement, write an SQL query that provides the solution to the question. <</SYS>> CREATE TABLE statement: CREATE TABLE "career_summary" ( "season" text, "series" text, "team" text, "races" real, "wins" real, "poles" real, "f_laps" real, "podiums" real, "points" real, "position" text );. Question: "What is the total number of podiums, maximum points, minimum points, average points, and total races for each team in season 2010 for the Campionato Italiano Superstars series, listing only the top 5 teams with the highest total number of podiums?". [/INST] SELECT "team", COUNT("podiums") AS total_podiums, MAX("points") AS max_points, MIN("points") AS min_points, AVG("points") AS avg_points, SUM("races") AS total_races FROM "career_summary" WHERE "season"='2010' AND "series"='Campionato Italiano Superstars' GROUP BY "team" ORDER BY total_podiums DESC LIMIT 5;</s>
<s>[INST] <<SYS>> You are an expert in SQL and data analysis. Given the table structure described by the CREATE TABLE statement, write an SQL query that provides the solution to the question. <</SYS>> CREATE TABLE statement: CREATE TABLE "career_summary" ( "season" text, "series" text, "team" text, "races" real, "wins" real, "poles" real, "f_laps" real, "podiums" real, "points" real, "position" text );. Question: "List the number of races and total wins per team that has more than 144 points, and order them by total wins in descending order, limit the results to the top 5.". [/INST] SELECT "team", COUNT("races"), SUM("wins") FROM "career_summary" WHERE "points" > 144 GROUP BY "team" ORDER BY SUM("wins") DESC LIMIT 5;</s>
<s>[INST] <<SYS>> You are an expert in SQL and data analysis. Given the table structure described by the CREATE TABLE statement, write an SQL query that provides the solution to the question. <</SYS>> CREATE TABLE statement: CREATE TABLE "table1_10470082_3" ( "no" real, "num" real, "title" text, "director" text, "writer" text, "us_air_date" text, "storyteller" text, "villains" text );. Question: "How many episodes each writer has aired on different US air dates, and list the top 5 writers who have aired the most episodes on September 25, 1993.". [/INST] SELECT "writer", COUNT("no") FROM "table1_10470082_3" WHERE "us_air_date"='September 25, 1993' GROUP BY "writer" ORDER BY COUNT("no") DESC LIMIT 5;</s>
<s>[INST] <<SYS>> You are an expert in SQL and data analysis. Given the table structure described by the CREATE TABLE statement, write an SQL query that provides the solution to the question. <</SYS>> CREATE TABLE statement: CREATE TABLE "table1_10470082_3" ( "no" real, "num" real, "title" text, "director" text, "writer" text, "us_air_date" text, "storyteller" text, "villains" text );. Question: "How many unique villians were there in each episode, list top 5 episodes with the most unique villains.". [/INST] SELECT "no", COUNT(DISTINCT "villains") FROM "table1_10470082_3" GROUP BY "no" ORDER BY COUNT(DISTINCT "villains") DESC LIMIT 5;</s>
<s>[INST] <<SYS>> You are an expert in SQL and data analysis. Given the table structure described by the CREATE TABLE statement, write an SQL query that provides the solution to the question. <</SYS>> CREATE TABLE statement: CREATE TABLE "year_by_year" ( "year" real, "division" real, "league" text, "regular_season" text, "playoffs" text, "open_cup" text );. Question: "What is the maximum and minimum year and corresponding division for which the regular season was '4th, Northwest' and also count how many times it occurred in descending order of the year?". [/INST] SELECT MAX("year"), MIN("year"), "division", COUNT("regular_season") FROM "year_by_year" WHERE "regular_season"='4th, Northwest' GROUP BY "division" ORDER BY MAX("year") DESC LIMIT 4;</s>
<s>[INST] <<SYS>> You are an expert in SQL and data analysis. Given the table structure described by the CREATE TABLE statement, write an SQL query that provides the solution to the question. <</SYS>> CREATE TABLE statement: CREATE TABLE "year_by_year" ( "year" real, "division" real, "league" text, "regular_season" text, "playoffs" text, "open_cup" text );. Question: "What is the total number of unique leagues for each division where the regular season is 6th, Southwest and order them descending by the number of playoffs, limiting the output to the top 5?". [/INST] SELECT "division", COUNT(DISTINCT "league") as num_leagues, COUNT("playoffs") as num_playoffs FROM "year_by_year" WHERE "regular_season"='6th, Southwest' GROUP BY "division" ORDER BY num_playoffs DESC LIMIT 5;</s>
<s>[INST] <<SYS>> You are an expert in SQL and data analysis. Given the table structure described by the CREATE TABLE statement, write an SQL query that provides the solution to the question. <</SYS>> CREATE TABLE statement: CREATE TABLE "year_by_year" ( "year" real, "division" real, "league" text, "regular_season" text, "playoffs" text, "open_cup" text );. Question: "For each league, find the year and maximum division where the regular season was won, limit this to the top 5 results.". [/INST] SELECT "league", "year", MAX("division") as max_division FROM "year_by_year" WHERE "regular_season"='Won' GROUP BY "league" ORDER BY max_division DESC LIMIT 5;</s>
<s>[INST] <<SYS>> You are an expert in SQL and data analysis. Given the table structure described by the CREATE TABLE statement, write an SQL query that provides the solution to the question. <</SYS>> CREATE TABLE statement: CREATE TABLE "year_by_year" ( "year" real, "division" real, "league" text, "regular_season" text, "playoffs" text, "open_cup" text );. Question: "Count the number of years a league had '2nd, Northwest' as their regular season outcome, order the results by the number of years in descending order and limit the output to the top 5.". [/INST] SELECT "league", COUNT("year") AS "total_years" FROM "year_by_year" WHERE "regular_season"='2nd, Northwest' GROUP BY "league" ORDER BY "total_years" DESC LIMIT 5;</s>
<s>[INST] <<SYS>> You are an expert in SQL and data analysis. Given the table structure described by the CREATE TABLE statement, write an SQL query that provides the solution to the question. <</SYS>> CREATE TABLE statement: CREATE TABLE "year_by_year" ( "year" real, "division" real, "league" text, "regular_season" text, "playoffs" text, "open_cup" text );. Question: "What is the maximum and minimum division level reached in each regular season for year 2011, and also provide the total count of leagues participated in those seasons?". [/INST] SELECT "regular_season", MAX("division"), MIN("division"), COUNT("league") FROM "year_by_year" WHERE "year"=2011 GROUP BY "regular_season";</s>
<s>[INST] <<SYS>> You are an expert in SQL and data analysis. Given the table structure described by the CREATE TABLE statement, write an SQL query that provides the solution to the question. <</SYS>> CREATE TABLE statement: CREATE TABLE "table1_10470082_5" ( "no" real, "num" real, "title" text, "director" text, "writer" text, "us_air_date" text, "storyteller" text, "villains" text );. Question: "What is the maximum, minimum and average number of titles by each director for the episodes with number 11, ordered by the number of titles in descending order, limiting the result to 5 rows?". [/INST] SELECT "director", MAX("num"), MIN("num"), AVG("num"), COUNT("title") AS count_titles FROM "table1_10470082_5" WHERE "num"=11 GROUP BY "director" ORDER BY count_titles DESC LIMIT 5;</s>
<s>[INST] <<SYS>> You are an expert in SQL and data analysis. Given the table structure described by the CREATE TABLE statement, write an SQL query that provides the solution to the question. <</SYS>> CREATE TABLE statement: CREATE TABLE "table1_10470082_5" ( "no" real, "num" real, "title" text, "director" text, "writer" text, "us_air_date" text, "storyteller" text, "villains" text );. Question: "What are the unique titles of the most and least episodes by specific directors where Mrs. Briar is a villain, grouped by the US air date.". [/INST] SELECT "director", MIN("title"), MAX("title") FROM "table1_10470082_5" WHERE "villains"='Mrs. Briar' GROUP BY "us_air_date" ORDER BY COUNT("no") DESC, "us_air_date" ASC LIMIT 10;</s>
<s>[INST] <<SYS>> You are an expert in SQL and data analysis. Given the table structure described by the CREATE TABLE statement, write an SQL query that provides the solution to the question. <</SYS>> CREATE TABLE statement: CREATE TABLE "table1_10470082_5" ( "no" real, "num" real, "title" text, "director" text, "writer" text, "us_air_date" text, "storyteller" text, "villains" text );. Question: "What is the maximum, minimum and average number of occurrences of a certain title, grouped by director, for entries with the number 8, limited to the top 5 results?". [/INST] SELECT "director", MAX("title"), MIN("title"), AVG("title") FROM "table1_10470082_5" WHERE "num"=8 GROUP BY "director" ORDER BY COUNT("title") DESC LIMIT 5;</s>
<s>[INST] <<SYS>> You are an expert in SQL and data analysis. Given the table structure described by the CREATE TABLE statement, write an SQL query that provides the solution to the question. <</SYS>> CREATE TABLE statement: CREATE TABLE "table1_10470082_5" ( "no" real, "num" real, "title" text, "director" text, "writer" text, "us_air_date" text, "storyteller" text, "villains" text );. Question: "How many episodes with the title "The Tale of the Room for Rent" were directed by each director, sorted by the count in descending order, and limit to 5". [/INST] SELECT "director", COUNT("num") FROM "table1_10470082_5" WHERE "title"='\"The Tale of the Room for Rent\"' GROUP BY "director" ORDER BY COUNT("num") DESC LIMIT 5;</s>
<s>[INST] <<SYS>> You are an expert in SQL and data analysis. Given the table structure described by the CREATE TABLE statement, write an SQL query that provides the solution to the question. <</SYS>> CREATE TABLE statement: CREATE TABLE "table1_10470082_6" ( "no" real, "num" real, "title" text, "director" text, "writer" text, "us_air_date" text, "storyteller" text, "villains" text );. Question: "How many episodes told by Kiki are there and what is the latest and earliest US air date of these episodes, sorted by the number of villains in each episode?". [/INST] SELECT COUNT("title"), MAX("us_air_date"), MIN("us_air_date") FROM "table1_10470082_6" WHERE "storyteller"='Kiki' GROUP BY "villains" ORDER BY COUNT("villains") DESC;</s>
<s>[INST] <<SYS>> You are an expert in SQL and data analysis. Given the table structure described by the CREATE TABLE statement, write an SQL query that provides the solution to the question. <</SYS>> CREATE TABLE statement: CREATE TABLE "table1_10470082_6" ( "no" real, "num" real, "title" text, "director" text, "writer" text, "us_air_date" text, "storyteller" text, "villains" text );. Question: "Identify the episode with the highest number that the storyteller of "The Tale of the Jagged Sign" has been a part of, and display that number along with the count of episodes they have been involved in.". [/INST] SELECT MAX("no"), COUNT("title") FROM "table1_10470082_6" WHERE "storyteller"= (SELECT "storyteller" FROM "table1_10470082_6" WHERE "title"='\"The Tale of the Jagged Sign\"') GROUP BY "storyteller";</s>
<s>[INST] <<SYS>> You are an expert in SQL and data analysis. Given the table structure described by the CREATE TABLE statement, write an SQL query that provides the solution to the question. <</SYS>> CREATE TABLE statement: CREATE TABLE "table1_10470082_6" ( "no" real, "num" real, "title" text, "director" text, "writer" text, "us_air_date" text, "storyteller" text, "villains" text );. Question: "Who are the top 3 writers who have written the most number of episodes, specifically related to villain 'X'?". [/INST] SELECT "writer", COUNT("num") as "Number_of_episodes" FROM "table1_10470082_6" WHERE "villains"='X' GROUP BY "writer" ORDER BY "Number_of_episodes" DESC LIMIT 3;</s>
<s>[INST] <<SYS>> You are an expert in SQL and data analysis. Given the table structure described by the CREATE TABLE statement, write an SQL query that provides the solution to the question. <</SYS>> CREATE TABLE statement: CREATE TABLE "table1_10470082_7" ( "no" real, "num" real, "title" text, "director" text, "writer" text, "us_air_date" text, "storyteller" text, "villains" text );. Question: "How many villains are in each episode and list down the top 5 episodes with the most number of villains?". [/INST] SELECT "title", COUNT("villains") AS "Number_of_Villains" FROM "table1_10470082_7" GROUP BY "title" ORDER BY "Number_of_Villains" DESC LIMIT 5;</s>
<s>[INST] <<SYS>> You are an expert in SQL and data analysis. Given the table structure described by the CREATE TABLE statement, write an SQL query that provides the solution to the question. <</SYS>> CREATE TABLE statement: CREATE TABLE "table1_10470082_7" ( "no" real, "num" real, "title" text, "director" text, "writer" text, "us_air_date" text, "storyteller" text, "villains" text );. Question: "What is the maximum and minimum number of villains across all storytellers for the episode titled "The Tale of the Virtual Pets" and who are the directors of these episodes?". [/INST] SELECT "storyteller", MAX("villains"), MIN("villains"), "director" FROM "table1_10470082_7" WHERE "title"='\"The Tale of The Virtual Pets\"' GROUP BY "storyteller";</s>
<s>[INST] <<SYS>> You are an expert in SQL and data analysis. Given the table structure described by the CREATE TABLE statement, write an SQL query that provides the solution to the question. <</SYS>> CREATE TABLE statement: CREATE TABLE "table1_10470082_7" ( "no" real, "num" real, "title" text, "director" text, "writer" text, "us_air_date" text, "storyteller" text, "villains" text );. Question: "Count the number of unique villains in the episodes where Megan is the storyteller and Lorette LeBlanc is the director, also sort the result by the count in ascending order and limit the output to 10 results.". [/INST] SELECT "villains", COUNT(DISTINCT "title") FROM "table1_10470082_7" WHERE "storyteller"='Megan' AND "director"='Lorette LeBlanc' GROUP BY "villains" ORDER BY COUNT(DISTINCT "title") ASC LIMIT 10;</s>
<s>[INST] <<SYS>> You are an expert in SQL and data analysis. Given the table structure described by the CREATE TABLE statement, write an SQL query that provides the solution to the question. <</SYS>> CREATE TABLE statement: CREATE TABLE "table1_10470082_7" ( "no" real, "num" real, "title" text, "director" text, "writer" text, "us_air_date" text, "storyteller" text, "villains" text );. Question: "What is the largest and smallest # for each episode written by each writer and sort them by the writer's name in descending order with a limitation of 5 rows?". [/INST] SELECT "writer", MAX("num"), MIN("num") FROM "table1_10470082_7" GROUP BY "writer" ORDER BY "writer" DESC LIMIT 5;</s>
<s>[INST] <<SYS>> You are an expert in SQL and data analysis. Given the table structure described by the CREATE TABLE statement, write an SQL query that provides the solution to the question. <</SYS>> CREATE TABLE statement: CREATE TABLE "fisher_s_iris_data" ( "sepal_length" text, "sepal_width" text, "petal_length" text, "petal_width" text, "species" text );. Question: "How many different species have petal length and width combinations equivalent to or exceeding 4.9 and 2.0 respectively, and order them alphabetically. Limit the results to the top 5.". [/INST] SELECT "species", COUNT("species") FROM "fisher_s_iris_data" WHERE "petal_length">='4.9' AND "petal_width">='2.0' GROUP BY "species" ORDER BY "species" ASC LIMIT 5;</s>
<s>[INST] <<SYS>> You are an expert in SQL and data analysis. Given the table structure described by the CREATE TABLE statement, write an SQL query that provides the solution to the question. <</SYS>> CREATE TABLE statement: CREATE TABLE "fisher_s_iris_data" ( "sepal_length" text, "sepal_width" text, "petal_length" text, "petal_width" text, "species" text );. Question: "What is the average sepal width for the top 5 petal lengths of the 'I.virginica' species, in decreasing order?". [/INST] SELECT AVG("sepal_width"), "petal_length" FROM "fisher_s_iris_data" WHERE "species"='I.virginica' GROUP BY "petal_length" ORDER BY "petal_length" DESC LIMIT 5;</s>
<s>[INST] <<SYS>> You are an expert in SQL and data analysis. Given the table structure described by the CREATE TABLE statement, write an SQL query that provides the solution to the question. <</SYS>> CREATE TABLE statement: CREATE TABLE "fisher_s_iris_data" ( "sepal_length" text, "sepal_width" text, "petal_length" text, "petal_width" text, "species" text );. Question: "What are the minimum and maximum petal lengths for each unique species having sepal width of 3.4 and sepal length of 5.4, and sort these results by petal length in descending order, displaying only the top 5 results.". [/INST] SELECT "species", MIN("petal_length"), MAX("petal_length") FROM "fisher_s_iris_data" WHERE "sepal_width"='3.4' AND "sepal_length"='5.4' GROUP BY "species" ORDER BY MAX("petal_length") DESC LIMIT 5;</s>
<s>[INST] <<SYS>> You are an expert in SQL and data analysis. Given the table structure described by the CREATE TABLE statement, write an SQL query that provides the solution to the question. <</SYS>> CREATE TABLE statement: CREATE TABLE "fisher_s_iris_data" ( "sepal_length" text, "sepal_width" text, "petal_length" text, "petal_width" text, "species" text );. Question: "What's the average sepal length and maximum petal width for each species where sepal width is greater than 2.8 and petal length is less than 5.1, ordered by sepal length in descending order and limit the result to 5 species.". [/INST] SELECT "species", AVG("sepal_length"), MAX("petal_width") FROM "fisher_s_iris_data" WHERE "sepal_width">'2.8' AND "petal_length"<'5.1' GROUP BY "species" ORDER BY AVG("sepal_length") DESC LIMIT 5;</s>
<s>[INST] <<SYS>> You are an expert in SQL and data analysis. Given the table structure described by the CREATE TABLE statement, write an SQL query that provides the solution to the question. <</SYS>> CREATE TABLE statement: CREATE TABLE "fisher_s_iris_data" ( "sepal_length" text, "sepal_width" text, "petal_length" text, "petal_width" text, "species" text );. Question: "What are the top 5 most common sepal width measurements, their count, and their average petal length for the species when sepal length is 6.5 and petal width is 2.2?". [/INST] SELECT "sepal_width", COUNT("sepal_width"), AVG("petal_length") FROM "fisher_s_iris_data" WHERE "sepal_length"='6.5' AND "petal_width"='2.2' GROUP BY "sepal_width" ORDER BY COUNT("sepal_width") DESC LIMIT 5;</s>
<s>[INST] <<SYS>> You are an expert in SQL and data analysis. Given the table structure described by the CREATE TABLE statement, write an SQL query that provides the solution to the question. <</SYS>> CREATE TABLE statement: CREATE TABLE "fisher_s_iris_data" ( "sepal_length" text, "sepal_width" text, "petal_length" text, "petal_width" text, "species" text );. Question: "What is the average sepal length and the maximum and minimum petal length for each species type when the sepal width is less than or equal to 2.9 and the petal width is greater than or equal to 1.3, order the result by average sepal length and limit the result to the top 5.". [/INST] SELECT "species", AVG("sepal_length"), MAX("petal_length"), MIN("petal_length") FROM "fisher_s_iris_data" WHERE "sepal_width"<= '2.9' AND "petal_width">= '1.3' GROUP BY "species" ORDER BY AVG("sepal_length") DESC LIMIT 5;</s>
<s>[INST] <<SYS>> You are an expert in SQL and data analysis. Given the table structure described by the CREATE TABLE statement, write an SQL query that provides the solution to the question. <</SYS>> CREATE TABLE statement: CREATE TABLE "table1_10470082_4" ( "no" real, "num" real, "title" text, "director" text, "writer" text, "us_air_date" text, "storyteller" text, "villains" text );. Question: "How many episodes have been directed by the director of episode #1 of Are You Afraid of the Dark season 3, and what's the average and minimum episode number?". [/INST] SELECT COUNT("no"), AVG("num"), MIN("num") FROM "table1_10470082_4" WHERE "director"=(SELECT "director" FROM "table1_10470082_4" WHERE "num"=1) GROUP BY "director";</s>
<s>[INST] <<SYS>> You are an expert in SQL and data analysis. Given the table structure described by the CREATE TABLE statement, write an SQL query that provides the solution to the question. <</SYS>> CREATE TABLE statement: CREATE TABLE "table1_10470082_4" ( "no" real, "num" real, "title" text, "director" text, "writer" text, "us_air_date" text, "storyteller" text, "villains" text );. Question: "For each episode written by Scott Peters, list the directors and the number of episodes they directed, and order them by the number of episodes in descending order. Limit the list to the top 5 directors.". [/INST] SELECT "director", COUNT("no") as episode_count FROM "table1_10470082_4" WHERE "writer"='Scott Peters' GROUP BY "director" ORDER BY episode_count DESC LIMIT 5;</s>
<s>[INST] <<SYS>> You are an expert in SQL and data analysis. Given the table structure described by the CREATE TABLE statement, write an SQL query that provides the solution to the question. <</SYS>> CREATE TABLE statement: CREATE TABLE "table1_10470082_4" ( "no" real, "num" real, "title" text, "director" text, "writer" text, "us_air_date" text, "storyteller" text, "villains" text );. Question: "What are the top 3 episodes (based on episode number) with the most frequent villain appearance and who is the villain?". [/INST] SELECT "num", "villains", COUNT(*) FROM "table1_10470082_4" GROUP BY "villains" ORDER BY COUNT(*) DESC, "num" DESC LIMIT 3;</s>
<s>[INST] <<SYS>> You are an expert in SQL and data analysis. Given the table structure described by the CREATE TABLE statement, write an SQL query that provides the solution to the question. <</SYS>> CREATE TABLE statement: CREATE TABLE "table1_10470082_8" ( "no" real, "num" real, "title" text, "director" text, "writer" text, "us_air_date" text, "storyteller" text, "villains" text );. Question: "Count the number of episodes directed by each director for the villains appearing in the first episode of season 7, order the count in descending order and limit the result to top 3.". [/INST] SELECT "director", COUNT("no") as "num_of_episodes" FROM "table1_10470082_8" WHERE "villains" IN (SELECT "villains" FROM "table1_10470082_8" WHERE "num"=1) GROUP BY "director" ORDER BY "num_of_episodes" DESC LIMIT 3;</s>
<s>[INST] <<SYS>> You are an expert in SQL and data analysis. Given the table structure described by the CREATE TABLE statement, write an SQL query that provides the solution to the question. <</SYS>> CREATE TABLE statement: CREATE TABLE "table1_10470082_8" ( "no" real, "num" real, "title" text, "director" text, "writer" text, "us_air_date" text, "storyteller" text, "villains" text );. Question: "How many episodes written by each writer aired, and when did the latest and earliest ones air ordered by the number of episodes in descending order and limited to 5 records?". [/INST] SELECT "writer", COUNT("no") as episode_count, MAX("us_air_date") as latest_airing, MIN("us_air_date") as earliest_airing FROM "table1_10470082_8" GROUP BY "writer" ORDER BY episode_count DESC LIMIT 5;</s>
<s>[INST] <<SYS>> You are an expert in SQL and data analysis. Given the table structure described by the CREATE TABLE statement, write an SQL query that provides the solution to the question. <</SYS>> CREATE TABLE statement: CREATE TABLE "race_results" ( "rd" real, "name" text, "pole_position" text, "fastest_lap" text, "winning_driver" text, "winning_team" text, "report" text );. Question: "What were the top three fastest laps achieved by winning drivers in races where Datsun Twin 200 participated, and which teams did they belong to?". [/INST] SELECT "fastest_lap", "winning_driver", "winning_team" FROM "race_results" WHERE "name"='Datsun Twin 200' ORDER BY "fastest_lap" ASC LIMIT 3;</s>