output stringlengths 27 479 | instruction stringlengths 407 1.39k |
|---|---|
SELECT "general_classification" FROM "jersey_progress" WHERE "mountains_classification"='christophe moreau' AND "team_classification"='team csc'; |
## Task
Generate a SQL query to answer the following question:
`What is the general classification for a mountains value of Christophe Moreau and a Team winner of Team CSC?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "jersey_progress" (
"stage_winner" text,
"general_classification" text,
"mountains_classification" text,
"points_classification" text,
"combination_classification" text,
"team_classification" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the general classification for a mountains value of Christophe Moreau and a Team winner of Team CSC?`:
```sql
|
SELECT "frequency" FROM "am" WHERE "call_sign"='kqlx'; |
## Task
Generate a SQL query to answer the following question:
`What is the frequency of KQLX?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "am" (
"frequency" text,
"call_sign" text,
"name" text,
"format" text,
"owner" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the frequency of KQLX?`:
```sql
|
SELECT "call_sign" FROM "am" WHERE "frequency"='1200 am'; |
## Task
Generate a SQL query to answer the following question:
`What is the call sign of 1200 am?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "am" (
"frequency" text,
"call_sign" text,
"name" text,
"format" text,
"owner" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the call sign of 1200 am?`:
```sql
|
SELECT "frequency" FROM "am" WHERE "format"='talk'; |
## Task
Generate a SQL query to answer the following question:
`What is the frequency of the talk station?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "am" (
"frequency" text,
"call_sign" text,
"name" text,
"format" text,
"owner" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the frequency of the talk station?`:
```sql
|
SELECT "frequency" FROM "am" WHERE "call_sign"='kfnw'; |
## Task
Generate a SQL query to answer the following question:
`What is the frequency of KFNW?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "am" (
"frequency" text,
"call_sign" text,
"name" text,
"format" text,
"owner" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the frequency of KFNW?`:
```sql
|
SELECT "constructor" FROM "non_championship_race_results" WHERE "race_name"='vii race of champions'; |
## Task
Generate a SQL query to answer the following question:
`What is the constructor for the VII Race of Champions?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "non_championship_race_results" (
"race_name" text,
"circuit" text,
"date" text,
"winning_driver" text,
"constructor" text,
"report" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the constructor for the VII Race of Champions?`:
```sql
|
SELECT "race_name" FROM "non_championship_race_results" WHERE "winning_driver"='carlos reutemann'; |
## Task
Generate a SQL query to answer the following question:
`What is the name of the race won by driver Carlos Reutemann?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "non_championship_race_results" (
"race_name" text,
"circuit" text,
"date" text,
"winning_driver" text,
"constructor" text,
"report" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the name of the race won by driver Carlos Reutemann?`:
```sql
|
SELECT AVG("rebs") FROM "g" WHERE "from"=1986 AND "pos"='sg'; |
## Task
Generate a SQL query to answer the following question:
`What is the average rebounds for the player who started in 1986 and who plays SG?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "g" (
"player" text,
"pos" text,
"from" real,
"school_country" text,
"rebs" real,
"asts" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the average rebounds for the player who started in 1986 and who plays SG?`:
```sql
|
SELECT "school_country" FROM "g" WHERE "from"<1986 AND "rebs"<711 AND "pos"='f'; |
## Task
Generate a SQL query to answer the following question:
`What is the school for player who began in 1986, has fewer rebounds than 711 and plays F?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "g" (
"player" text,
"pos" text,
"from" real,
"school_country" text,
"rebs" real,
"asts" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the school for player who began in 1986, has fewer rebounds than 711 and plays F?`:
```sql
|
SELECT MAX("from") FROM "g" WHERE "asts"<0; |
## Task
Generate a SQL query to answer the following question:
`What is the highest of a player with asts fewer than 0?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "g" (
"player" text,
"pos" text,
"from" real,
"school_country" text,
"rebs" real,
"asts" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the highest of a player with asts fewer than 0?`:
```sql
|
SELECT "date" FROM "march" WHERE "home"='st. louis'; |
## Task
Generate a SQL query to answer the following question:
`what is the date when the home is st. louis?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "march" (
"date" text,
"visitor" text,
"score" text,
"home" text,
"decision" text,
"attendance" real,
"record" text
);
### SQL
Given the database schema, here is the SQL query that answers `what is the date when the home is st. louis?`:
```sql
|
SELECT "home" FROM "march" WHERE "date"='march 12'; |
## Task
Generate a SQL query to answer the following question:
`Where is the home on march 12?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "march" (
"date" text,
"visitor" text,
"score" text,
"home" text,
"decision" text,
"attendance" real,
"record" text
);
### SQL
Given the database schema, here is the SQL query that answers `Where is the home on march 12?`:
```sql
|
SELECT "decision" FROM "march" WHERE "date"='march 18'; |
## Task
Generate a SQL query to answer the following question:
`what is the decision on the date march 18?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "march" (
"date" text,
"visitor" text,
"score" text,
"home" text,
"decision" text,
"attendance" real,
"record" text
);
### SQL
Given the database schema, here is the SQL query that answers `what is the decision on the date march 18?`:
```sql
|
SELECT COUNT("tckl") FROM "high_school_statistics" WHERE "year"='2000' AND "p_ko_ret"<14; |
## Task
Generate a SQL query to answer the following question:
`What is the total of TCKL in 2000 with a P/KO RET less than 14?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "high_school_statistics" (
"year" text,
"tckl" real,
"sack" real,
"p_ko_ret" real,
"yards" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the total of TCKL in 2000 with a P/KO RET less than 14?`:
```sql
|
SELECT MAX("yards") FROM "high_school_statistics" WHERE "tckl">51 AND "sack"<2; |
## Task
Generate a SQL query to answer the following question:
`What is the highest YARDS with a TCKL more than 51 and less than 2 SACK?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "high_school_statistics" (
"year" text,
"tckl" real,
"sack" real,
"p_ko_ret" real,
"yards" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the highest YARDS with a TCKL more than 51 and less than 2 SACK?`:
```sql
|
SELECT COUNT("yards") FROM "high_school_statistics" WHERE "sack"=0 AND "p_ko_ret"<14; |
## Task
Generate a SQL query to answer the following question:
`What is the total of all YARDS with 0 SACK and less than 14 P/KO RET?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "high_school_statistics" (
"year" text,
"tckl" real,
"sack" real,
"p_ko_ret" real,
"yards" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the total of all YARDS with 0 SACK and less than 14 P/KO RET?`:
```sql
|
SELECT "name" FROM "women_s_tournament" WHERE "2008_club"='voléro zürich'; |
## Task
Generate a SQL query to answer the following question:
`Tell me the name for 2008 club of voléro zürich`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "women_s_tournament" (
"name" text,
"height" text,
"weight" text,
"spike" text,
"2008_club" text
);
### SQL
Given the database schema, here is the SQL query that answers `Tell me the name for 2008 club of voléro zürich`:
```sql
|
SELECT "pick" FROM "draft" WHERE "college"='west virginia'; |
## Task
Generate a SQL query to answer the following question:
`What is the pick for West Virginia college?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "draft" (
"round" text,
"pick" text,
"player" text,
"position" text,
"nationality" text,
"team" text,
"college" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the pick for West Virginia college?`:
```sql
|
SELECT "round" FROM "draft" WHERE "position"='f/c' AND "college"='iowa'; |
## Task
Generate a SQL query to answer the following question:
`What round has a position of F/C from Iowa College?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "draft" (
"round" text,
"pick" text,
"player" text,
"position" text,
"nationality" text,
"team" text,
"college" text
);
### SQL
Given the database schema, here is the SQL query that answers `What round has a position of F/C from Iowa College?`:
```sql
|
SELECT "nationality" FROM "draft" WHERE "pick"='1'; |
## Task
Generate a SQL query to answer the following question:
`What nationality has a pick of 1?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "draft" (
"round" text,
"pick" text,
"player" text,
"position" text,
"nationality" text,
"team" text,
"college" text
);
### SQL
Given the database schema, here is the SQL query that answers `What nationality has a pick of 1?`:
```sql
|
SELECT "nationality" FROM "draft" WHERE "round"='1' AND "position"='f' AND "college"='louisville'; |
## Task
Generate a SQL query to answer the following question:
`Which nationality has a round of 1, and F position from Louisville?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "draft" (
"round" text,
"pick" text,
"player" text,
"position" text,
"nationality" text,
"team" text,
"college" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which nationality has a round of 1, and F position from Louisville?`:
```sql
|
SELECT "away_team" FROM "round_20" WHERE "venue"='arden street oval'; |
## Task
Generate a SQL query to answer the following question:
`Which team plays at the Arden Street Oval?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_20" (
"home_team" text,
"home_team_score" text,
"away_team" text,
"away_team_score" text,
"venue" text,
"crowd" real,
"date" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which team plays at the Arden Street Oval?`:
```sql
|
SELECT "venue" FROM "round_20" WHERE "home_team"='carlton'; |
## Task
Generate a SQL query to answer the following question:
`Where does Carlton play?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_20" (
"home_team" text,
"home_team_score" text,
"away_team" text,
"away_team_score" text,
"venue" text,
"crowd" real,
"date" text
);
### SQL
Given the database schema, here is the SQL query that answers `Where does Carlton play?`:
```sql
|
SELECT "date" FROM "april" WHERE "home"='grizzlies' AND "visitor"='timberwolves'; |
## Task
Generate a SQL query to answer the following question:
`What was the date of the game in which the home team was the Grizzlies and the visiting team was the Timberwolves?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "april" (
"date" text,
"visitor" text,
"score" text,
"home" text,
"leading_scorer" text,
"record" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the date of the game in which the home team was the Grizzlies and the visiting team was the Timberwolves?`:
```sql
|
SELECT "airing_date" FROM "third_line_series" WHERE "number_of_episodes"=20 AND "genre"='costume comedy'; |
## Task
Generate a SQL query to answer the following question:
`What is the airing date for costume comedy that has 20 episodes?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "third_line_series" (
"airing_date" text,
"english_title_chinese_title" text,
"number_of_episodes" real,
"genre" text,
"official_website" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the airing date for costume comedy that has 20 episodes?`:
```sql
|
SELECT "year" FROM "youngest_winners" WHERE "film"='7th heaven'; |
## Task
Generate a SQL query to answer the following question:
`What year was 7th heaven made?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "youngest_winners" (
"rank" real,
"name" text,
"film" text,
"year" text,
"date_of_birth" text,
"date_of_award" text
);
### SQL
Given the database schema, here is the SQL query that answers `What year was 7th heaven made?`:
```sql
|
SELECT "film" FROM "youngest_winners" WHERE "year"='1999'; |
## Task
Generate a SQL query to answer the following question:
`What film was made in 1999?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "youngest_winners" (
"rank" real,
"name" text,
"film" text,
"year" text,
"date_of_birth" text,
"date_of_award" text
);
### SQL
Given the database schema, here is the SQL query that answers `What film was made in 1999?`:
```sql
|
SELECT "city" FROM "tallest_buildings" WHERE "height_ft">328.1 AND "rank">56 AND "height_m"=103 AND "floors"<28; |
## Task
Generate a SQL query to answer the following question:
`what is the city with the height (ft) more than 328.1, rank higher than 56, a height (m) of 103 and floors less than 28?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "tallest_buildings" (
"rank" real,
"name" text,
"city" text,
"height_m" real,
"height_ft" real,
"floors" real
);
### SQL
Given the database schema, here is the SQL query that answers `what is the city with the height (ft) more than 328.1, rank higher than 56, a height (m) of 103 and floors less than 28?`:
```sql
|
SELECT SUM("floors") FROM "tallest_buildings" WHERE "name"='kölntriangle' AND "rank"<63; |
## Task
Generate a SQL query to answer the following question:
`what is the total of floors when the name is kölntriangle and rank is less thank 63?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "tallest_buildings" (
"rank" real,
"name" text,
"city" text,
"height_m" real,
"height_ft" real,
"floors" real
);
### SQL
Given the database schema, here is the SQL query that answers `what is the total of floors when the name is kölntriangle and rank is less thank 63?`:
```sql
|
SELECT MIN("height_ft") FROM "tallest_buildings" WHERE "name"='messeturm' AND "floors">55; |
## Task
Generate a SQL query to answer the following question:
`what is the lowest height (ft) for messeturm and more than 55 floors?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "tallest_buildings" (
"rank" real,
"name" text,
"city" text,
"height_m" real,
"height_ft" real,
"floors" real
);
### SQL
Given the database schema, here is the SQL query that answers `what is the lowest height (ft) for messeturm and more than 55 floors?`:
```sql
|
SELECT COUNT("rank") FROM "tallest_buildings" WHERE "city"='cologne' AND "floors"=34 AND "height_ft">452.8; |
## Task
Generate a SQL query to answer the following question:
`what is the rank for the city of cologne, floors is 34 and height (ft) is more than 452.8?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "tallest_buildings" (
"rank" real,
"name" text,
"city" text,
"height_m" real,
"height_ft" real,
"floors" real
);
### SQL
Given the database schema, here is the SQL query that answers `what is the rank for the city of cologne, floors is 34 and height (ft) is more than 452.8?`:
```sql
|
SELECT "opponents" FROM "group_stage" WHERE "attendance">'61,000' AND "result_f_a"='3–2'; |
## Task
Generate a SQL query to answer the following question:
`Which opponents have an Attendance larger than 61,000, and a Result F–A of 3–2?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "group_stage" (
"date" text,
"opponents" text,
"h_a" text,
"result_f_a" text,
"attendance" real,
"group_position" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which opponents have an Attendance larger than 61,000, and a Result F–A of 3–2?`:
```sql
|
SELECT "group_position" FROM "group_stage" WHERE "result_f_a"='0–1' AND "date"='1 november 2006'; |
## Task
Generate a SQL query to answer the following question:
`Which Group position has Result F–A of 0–1 on 1 november 2006?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "group_stage" (
"date" text,
"opponents" text,
"h_a" text,
"result_f_a" text,
"attendance" real,
"group_position" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which Group position has Result F–A of 0–1 on 1 november 2006?`:
```sql
|
SELECT "club" FROM "batsmen" WHERE "bowling_style"='right arm medium pace' AND "name"='r. h. c. human'; |
## Task
Generate a SQL query to answer the following question:
`What club is R. H. C. Human who has a right arm medium pace bowling style a member of?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "batsmen" (
"name" text,
"club" text,
"birth_date" text,
"batting_style" text,
"bowling_style" text
);
### SQL
Given the database schema, here is the SQL query that answers `What club is R. H. C. Human who has a right arm medium pace bowling style a member of?`:
```sql
|
SELECT "birth_date" FROM "batsmen" WHERE "batting_style"='right-handed' AND "name"='a. j. holmes'; |
## Task
Generate a SQL query to answer the following question:
`What is the birth date of A. J. Holmes who has a right-handed batting style?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "batsmen" (
"name" text,
"club" text,
"birth_date" text,
"batting_style" text,
"bowling_style" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the birth date of A. J. Holmes who has a right-handed batting style?`:
```sql
|
SELECT "batting_style" FROM "batsmen" WHERE "bowling_style"='right arm medium pace' AND "birth_date"='10 february 1910 (aged 29)'; |
## Task
Generate a SQL query to answer the following question:
`What is the batting style of the person who has a right arm medium pace bowling style and a birth date of 10 February 1910 (aged 29)?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "batsmen" (
"name" text,
"club" text,
"birth_date" text,
"batting_style" text,
"bowling_style" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the batting style of the person who has a right arm medium pace bowling style and a birth date of 10 February 1910 (aged 29)?`:
```sql
|
SELECT "weight" FROM "men_s_tournament" WHERE "name_v_t_e"='živko gocić category:articles with hcards'; |
## Task
Generate a SQL query to answer the following question:
`What is the weight for the v t e of živko gocić category:articles with hcards?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "men_s_tournament" (
"name_v_t_e" text,
"pos" text,
"height" text,
"weight" text,
"club" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the weight for the v t e of živko gocić category:articles with hcards?`:
```sql
|
SELECT "weight" FROM "men_s_tournament" WHERE "name_v_t_e"='duško pijetlović category:articles with hcards'; |
## Task
Generate a SQL query to answer the following question:
`What is the weight of the v t e of duško pijetlović category:articles with hcards?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "men_s_tournament" (
"name_v_t_e" text,
"pos" text,
"height" text,
"weight" text,
"club" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the weight of the v t e of duško pijetlović category:articles with hcards?`:
```sql
|
SELECT SUM("total") FROM "single_game" WHERE "player"='david o''callaghan' AND "tally"='1-9'; |
## Task
Generate a SQL query to answer the following question:
`What was the total for David O'Callaghan, and a Tally of 1-9?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "single_game" (
"rank" real,
"player" text,
"county" text,
"tally" text,
"total" real,
"opposition" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the total for David O'Callaghan, and a Tally of 1-9?`:
```sql
|
SELECT "opposition" FROM "single_game" WHERE "tally"='0-11'; |
## Task
Generate a SQL query to answer the following question:
`What is the opposition when the tally was 0-11?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "single_game" (
"rank" real,
"player" text,
"county" text,
"tally" text,
"total" real,
"opposition" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the opposition when the tally was 0-11?`:
```sql
|
SELECT "tally" FROM "single_game" WHERE "county"='kilkenny' AND "total"=10 AND "opposition"='waterford'; |
## Task
Generate a SQL query to answer the following question:
`What is the tally in Kilkenny county with 10 as the total and opposition of Waterford?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "single_game" (
"rank" real,
"player" text,
"county" text,
"tally" text,
"total" real,
"opposition" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the tally in Kilkenny county with 10 as the total and opposition of Waterford?`:
```sql
|
SELECT AVG("weeks_on_chart") FROM "charts" WHERE "position">3 AND "year">1977; |
## Task
Generate a SQL query to answer the following question:
`What is the average weeks of a song with a larger than 3 position after 1977?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "charts" (
"year" real,
"single" text,
"chart" text,
"position" real,
"weeks_on_chart" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the average weeks of a song with a larger than 3 position after 1977?`:
```sql
|
SELECT SUM("weeks_on_chart") FROM "charts" WHERE "position"<1; |
## Task
Generate a SQL query to answer the following question:
`What is the sum of the weeks on a chart a song with a position less than 1 haas?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "charts" (
"year" real,
"single" text,
"chart" text,
"position" real,
"weeks_on_chart" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the sum of the weeks on a chart a song with a position less than 1 haas?`:
```sql
|
SELECT MIN("year") FROM "charts" WHERE "position"<1; |
## Task
Generate a SQL query to answer the following question:
`What is the earliest year a song with a position less than 1 has?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "charts" (
"year" real,
"single" text,
"chart" text,
"position" real,
"weeks_on_chart" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the earliest year a song with a position less than 1 has?`:
```sql
|
SELECT "tyre" FROM "entries" WHERE "entrant"='scuderia milano'; |
## Task
Generate a SQL query to answer the following question:
`what is the tyre when the entrant is scuderia milano?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "entries" (
"driver" text,
"entrant" text,
"constructor" text,
"chassis" text,
"engine" text,
"tyre" text
);
### SQL
Given the database schema, here is the SQL query that answers `what is the tyre when the entrant is scuderia milano?`:
```sql
|
SELECT "driver" FROM "entries" WHERE "engine"='era 1.5 l6 s' AND "chassis"='era b'; |
## Task
Generate a SQL query to answer the following question:
`who is the driver with the engine era 1.5 l6 s and the chassis is era b?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "entries" (
"driver" text,
"entrant" text,
"constructor" text,
"chassis" text,
"engine" text,
"tyre" text
);
### SQL
Given the database schema, here is the SQL query that answers `who is the driver with the engine era 1.5 l6 s and the chassis is era b?`:
```sql
|
SELECT "driver" FROM "entries" WHERE "constructor"='maserati' AND "chassis"='maserati 4clt-48' AND "tyre"='d'; |
## Task
Generate a SQL query to answer the following question:
`who is the driver when the constructor is maserati, the chassis is maserati 4clt-48 and the tyre is d?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "entries" (
"driver" text,
"entrant" text,
"constructor" text,
"chassis" text,
"engine" text,
"tyre" text
);
### SQL
Given the database schema, here is the SQL query that answers `who is the driver when the constructor is maserati, the chassis is maserati 4clt-48 and the tyre is d?`:
```sql
|
SELECT "constructor" FROM "entries" WHERE "tyre"='d' AND "engine"='talbot 23cv 4.5 l6' AND "chassis"='talbot-lago t26c' AND "entrant"='ecurie belge'; |
## Task
Generate a SQL query to answer the following question:
`who is the constructor when the tyre is d, the engine is talbot 23cv 4.5 l6, the chassis is talbot-lago t26c and the entrant is ecurie belge?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "entries" (
"driver" text,
"entrant" text,
"constructor" text,
"chassis" text,
"engine" text,
"tyre" text
);
### SQL
Given the database schema, here is the SQL query that answers `who is the constructor when the tyre is d, the engine is talbot 23cv 4.5 l6, the chassis is talbot-lago t26c and the entrant is ecurie belge?`:
```sql
|
SELECT "kk_1" FROM "reactor_attributes" WHERE "kk_3"='1,100'; |
## Task
Generate a SQL query to answer the following question:
`What is KK -1 if KK -3 is 1,100?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "reactor_attributes" (
"kk_1" text,
"kk_2" text,
"kk_3" text,
"kk_4" text,
"kk_5" text,
"kk_6" text,
"kk_7" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is KK -1 if KK -3 is 1,100?`:
```sql
|
SELECT "kk_5" FROM "reactor_attributes" WHERE "kk_3"='310'; |
## Task
Generate a SQL query to answer the following question:
`What is KK -5 if KK - 3 is 310?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "reactor_attributes" (
"kk_1" text,
"kk_2" text,
"kk_3" text,
"kk_4" text,
"kk_5" text,
"kk_6" text,
"kk_7" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is KK -5 if KK - 3 is 310?`:
```sql
|
SELECT "kk_5" FROM "reactor_attributes" WHERE "kk_1"='1,067'; |
## Task
Generate a SQL query to answer the following question:
`What is KK - 5 if KK - 1 is 1,067?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "reactor_attributes" (
"kk_1" text,
"kk_2" text,
"kk_3" text,
"kk_4" text,
"kk_5" text,
"kk_6" text,
"kk_7" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is KK - 5 if KK - 1 is 1,067?`:
```sql
|
SELECT "winner" FROM "past_winners" WHERE "time"='1:12.00' AND "jockey"='melvin a. holland'; |
## Task
Generate a SQL query to answer the following question:
`Who is the Winner with a Time of 1:12.00 and Melvin A. Holland as the Jockey?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "past_winners" (
"year" text,
"winner" text,
"jockey" text,
"trainer" text,
"owner" text,
"time" text,
"purse" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who is the Winner with a Time of 1:12.00 and Melvin A. Holland as the Jockey?`:
```sql
|
SELECT "year" FROM "past_winners" WHERE "purse"='$83,925'; |
## Task
Generate a SQL query to answer the following question:
`Which Year has a Purse of $83,925?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "past_winners" (
"year" text,
"winner" text,
"jockey" text,
"trainer" text,
"owner" text,
"time" text,
"purse" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which Year has a Purse of $83,925?`:
```sql
|
SELECT "purse" FROM "past_winners" WHERE "year"='1998'; |
## Task
Generate a SQL query to answer the following question:
`What is the Purse listed for the Year of 1998?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "past_winners" (
"year" text,
"winner" text,
"jockey" text,
"trainer" text,
"owner" text,
"time" text,
"purse" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the Purse listed for the Year of 1998?`:
```sql
|
SELECT "winner" FROM "past_winners" WHERE "year"='2000'; |
## Task
Generate a SQL query to answer the following question:
`What's the Winner in the Year of 2000?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "past_winners" (
"year" text,
"winner" text,
"jockey" text,
"trainer" text,
"owner" text,
"time" text,
"purse" text
);
### SQL
Given the database schema, here is the SQL query that answers `What's the Winner in the Year of 2000?`:
```sql
|
SELECT "winner" FROM "past_winners" WHERE "time"='1:10.60' AND "owner"='leslie combs ii'; |
## Task
Generate a SQL query to answer the following question:
`What's the WInner with a TIme of 1:10.60, and Owner of Leslie Combs II?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "past_winners" (
"year" text,
"winner" text,
"jockey" text,
"trainer" text,
"owner" text,
"time" text,
"purse" text
);
### SQL
Given the database schema, here is the SQL query that answers `What's the WInner with a TIme of 1:10.60, and Owner of Leslie Combs II?`:
```sql
|
SELECT "trainer" FROM "past_winners" WHERE "year"='2013'; |
## Task
Generate a SQL query to answer the following question:
`Who is the Trainer with the Year of 2013?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "past_winners" (
"year" text,
"winner" text,
"jockey" text,
"trainer" text,
"owner" text,
"time" text,
"purse" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who is the Trainer with the Year of 2013?`:
```sql
|
SELECT "venue" FROM "round_17" WHERE "away_team_score"='11.11 (77)'; |
## Task
Generate a SQL query to answer the following question:
`What venue features an away side score of 11.11 (77)?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_17" (
"home_team" text,
"home_team_score" text,
"away_team" text,
"away_team_score" text,
"venue" text,
"crowd" real,
"date" text
);
### SQL
Given the database schema, here is the SQL query that answers `What venue features an away side score of 11.11 (77)?`:
```sql
|
SELECT "away_team" FROM "round_17" WHERE "crowd">'14,112' AND "away_team_score"='11.11 (77)'; |
## Task
Generate a SQL query to answer the following question:
`Who is the away side when the crowd is over 14,112 with an away team score of 11.11 (77)?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_17" (
"home_team" text,
"home_team_score" text,
"away_team" text,
"away_team_score" text,
"venue" text,
"crowd" real,
"date" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who is the away side when the crowd is over 14,112 with an away team score of 11.11 (77)?`:
```sql
|
SELECT "away_team_score" FROM "round_10" WHERE "away_team"='st kilda'; |
## Task
Generate a SQL query to answer the following question:
`How many points did the away team of st kilda score?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_10" (
"home_team" text,
"home_team_score" text,
"away_team" text,
"away_team_score" text,
"venue" text,
"crowd" real,
"date" text
);
### SQL
Given the database schema, here is the SQL query that answers `How many points did the away team of st kilda score?`:
```sql
|
SELECT "date" FROM "schedule" WHERE "result"='l 13–9'; |
## Task
Generate a SQL query to answer the following question:
`Tell me the date with result of l 13–9`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "schedule" (
"week" real,
"date" text,
"tv_time" text,
"opponent" text,
"result" text
);
### SQL
Given the database schema, here is the SQL query that answers `Tell me the date with result of l 13–9`:
```sql
|
SELECT COUNT("week") FROM "schedule" WHERE "result"='w 35–7'; |
## Task
Generate a SQL query to answer the following question:
`Tell me the total number of week for w 35–7`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "schedule" (
"week" real,
"date" text,
"tv_time" text,
"opponent" text,
"result" text
);
### SQL
Given the database schema, here is the SQL query that answers `Tell me the total number of week for w 35–7`:
```sql
|
SELECT AVG("week") FROM "schedule" WHERE "result"='l 34–24'; |
## Task
Generate a SQL query to answer the following question:
`Tell me the average week for result of l 34–24`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "schedule" (
"week" real,
"date" text,
"tv_time" text,
"opponent" text,
"result" text
);
### SQL
Given the database schema, here is the SQL query that answers `Tell me the average week for result of l 34–24`:
```sql
|
SELECT "czechoslovak_president" FROM "ambassadors_to_czechoslovakia" WHERE "tenure_begin"='1950'; |
## Task
Generate a SQL query to answer the following question:
`Who was the President of Czechoslovakia when an ambassador's tenure began in 1950?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "ambassadors_to_czechoslovakia" (
"name" text,
"tenure_begin" text,
"tenure_end" real,
"british_monarch" text,
"czechoslovak_president" text
);
### SQL
Given the database schema, here is the SQL query that answers `Who was the President of Czechoslovakia when an ambassador's tenure began in 1950?`:
```sql
|
SELECT SUM("share") FROM "u_s_ratings" WHERE "air_date"='november 19, 2007'; |
## Task
Generate a SQL query to answer the following question:
`What is the total share for an episode with an air date of November 19, 2007?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "u_s_ratings" (
"episode" text,
"air_date" text,
"rating" real,
"share" real,
"18_49_rating_share" text,
"viewers_m" real,
"weekly_rank" real
);
### SQL
Given the database schema, here is the SQL query that answers `What is the total share for an episode with an air date of November 19, 2007?`:
```sql
|
SELECT "manufacturer" FROM "125cc_classification" WHERE "time_retired"='+15.665'; |
## Task
Generate a SQL query to answer the following question:
`Which manufacturer has a Time/Retired of +15.665?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "125cc_classification" (
"rider" text,
"manufacturer" text,
"laps" real,
"time_retired" text,
"grid" real
);
### SQL
Given the database schema, here is the SQL query that answers `Which manufacturer has a Time/Retired of +15.665?`:
```sql
|
SELECT "laps" FROM "125cc_classification" WHERE "manufacturer"='aprilia' AND "grid"=10; |
## Task
Generate a SQL query to answer the following question:
`What were the laps of aprilia with a grid of 10?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "125cc_classification" (
"rider" text,
"manufacturer" text,
"laps" real,
"time_retired" text,
"grid" real
);
### SQL
Given the database schema, here is the SQL query that answers `What were the laps of aprilia with a grid of 10?`:
```sql
|
SELECT AVG("crowd") FROM "round_5" WHERE "venue"='junction oval'; |
## Task
Generate a SQL query to answer the following question:
`What was the size of the crowd at the game played at Junction Oval?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_5" (
"home_team" text,
"home_team_score" text,
"away_team" text,
"away_team_score" text,
"venue" text,
"crowd" real,
"date" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the size of the crowd at the game played at Junction Oval?`:
```sql
|
SELECT "date" FROM "round_5" WHERE "home_team"='north melbourne'; |
## Task
Generate a SQL query to answer the following question:
`When was the game when North Melbourne was the home team?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_5" (
"home_team" text,
"home_team_score" text,
"away_team" text,
"away_team_score" text,
"venue" text,
"crowd" real,
"date" text
);
### SQL
Given the database schema, here is the SQL query that answers `When was the game when North Melbourne was the home team?`:
```sql
|
SELECT "school_club_team" FROM "cfl_draft" WHERE "player"='andrew jones'; |
## Task
Generate a SQL query to answer the following question:
`Which School/Club Team does Andrew Jones play for?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "cfl_draft" (
"round" real,
"pick" text,
"player" text,
"position" text,
"school_club_team" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which School/Club Team does Andrew Jones play for?`:
```sql
|
SELECT "school_club_team" FROM "cfl_draft" WHERE "round"<2; |
## Task
Generate a SQL query to answer the following question:
`Which School/Club Team did not make it to round 2?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "cfl_draft" (
"round" real,
"pick" text,
"player" text,
"position" text,
"school_club_team" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which School/Club Team did not make it to round 2?`:
```sql
|
SELECT "player" FROM "cfl_draft" WHERE "pick"='24'; |
## Task
Generate a SQL query to answer the following question:
`Which player is the 24 pick?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "cfl_draft" (
"round" real,
"pick" text,
"player" text,
"position" text,
"school_club_team" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which player is the 24 pick?`:
```sql
|
SELECT AVG("round") FROM "cfl_draft" WHERE "pick"='16'; |
## Task
Generate a SQL query to answer the following question:
`What is the average round of the number 16 pick?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "cfl_draft" (
"round" real,
"pick" text,
"player" text,
"position" text,
"school_club_team" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the average round of the number 16 pick?`:
```sql
|
SELECT COUNT("lost") FROM "coaches_records" WHERE "win_pct"<16.7 AND "played"=3; |
## Task
Generate a SQL query to answer the following question:
`How many games were lost where the win percentage is smaller than 16.7 and the played games is 3?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "coaches_records" (
"name" text,
"coaching_career" text,
"played" real,
"drawn" real,
"lost" real,
"win_pct" real,
"points_per_game" real
);
### SQL
Given the database schema, here is the SQL query that answers `How many games were lost where the win percentage is smaller than 16.7 and the played games is 3?`:
```sql
|
SELECT "location" FROM "top_100_in_the_united_states" WHERE "name"='pine valley'; |
## Task
Generate a SQL query to answer the following question:
`Where is pine valley?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "top_100_in_the_united_states" (
"rank" real,
"name" text,
"location" text,
"state" text,
"designer_year" text
);
### SQL
Given the database schema, here is the SQL query that answers `Where is pine valley?`:
```sql
|
SELECT MIN("rank") FROM "top_100_in_the_united_states" WHERE "location"='augusta'; |
## Task
Generate a SQL query to answer the following question:
`What is augusta's low rank?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "top_100_in_the_united_states" (
"rank" real,
"name" text,
"location" text,
"state" text,
"designer_year" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is augusta's low rank?`:
```sql
|
SELECT "group" FROM "listed_breeds" WHERE "2011_registrations">75 AND "2005_registrations">140 AND "2002_registrations"<148; |
## Task
Generate a SQL query to answer the following question:
`Which group has a registration less than 75 in 2011, more then 140 in 2005, and less than 148 in 2002?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "listed_breeds" (
"breed_a" text,
"group" text,
"2002_registrations" real,
"2005_registrations" real,
"2011_registrations" real
);
### SQL
Given the database schema, here is the SQL query that answers `Which group has a registration less than 75 in 2011, more then 140 in 2005, and less than 148 in 2002?`:
```sql
|
SELECT "model" FROM "specs_and_range" WHERE "gcm_kg_technical_capacity"='42000'; |
## Task
Generate a SQL query to answer the following question:
`Which Model has the GCM (kg) Technical Capacity of 42000?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "specs_and_range" (
"model" text,
"engine_make_capacity" text,
"power_k_w_rpm" text,
"torque_nm_rpm" text,
"gvm_kg_technical_capacity" text,
"gcm_kg_technical_capacity" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which Model has the GCM (kg) Technical Capacity of 42000?`:
```sql
|
SELECT "model" FROM "specs_and_range" WHERE "gcm_kg_technical_capacity"='35000' AND "gvm_kg_technical_capacity"='16000' AND "engine_make_capacity"='cummins interact 6.0-euro iii (turbo intercooler)'; |
## Task
Generate a SQL query to answer the following question:
`Which Model has a GCM (kg) Technical Capacity of 35000, a GVM (kg) Technical Capacity of 16000, and Cummins Interact 6.0-euro III (turbo intercooler) for the Engine?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "specs_and_range" (
"model" text,
"engine_make_capacity" text,
"power_k_w_rpm" text,
"torque_nm_rpm" text,
"gvm_kg_technical_capacity" text,
"gcm_kg_technical_capacity" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which Model has a GCM (kg) Technical Capacity of 35000, a GVM (kg) Technical Capacity of 16000, and Cummins Interact 6.0-euro III (turbo intercooler) for the Engine?`:
```sql
|
SELECT "torque_nm_rpm" FROM "specs_and_range" WHERE "power_k_w_rpm"='184 @ 2500' AND "gvm_kg_technical_capacity"='16000'; |
## Task
Generate a SQL query to answer the following question:
`Which Torque Nm@rpm has a Power kW@rpm equal to 184 @ 2500 and a GVM (kg) Technical Capacity of 16000?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "specs_and_range" (
"model" text,
"engine_make_capacity" text,
"power_k_w_rpm" text,
"torque_nm_rpm" text,
"gvm_kg_technical_capacity" text,
"gcm_kg_technical_capacity" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which Torque Nm@rpm has a Power kW@rpm equal to 184 @ 2500 and a GVM (kg) Technical Capacity of 16000?`:
```sql
|
SELECT "character" FROM "star_parivaar_awards" WHERE "result"='won' AND "year"<2006; |
## Task
Generate a SQL query to answer the following question:
`Which character won before 2006?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "star_parivaar_awards" (
"year" real,
"category" text,
"character" text,
"for_the_show" text,
"result" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which character won before 2006?`:
```sql
|
SELECT "character" FROM "star_parivaar_awards" WHERE "category"='favourite maa' AND "year"=2004; |
## Task
Generate a SQL query to answer the following question:
`In 2004 who was favourite maa?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "star_parivaar_awards" (
"year" real,
"category" text,
"character" text,
"for_the_show" text,
"result" text
);
### SQL
Given the database schema, here is the SQL query that answers `In 2004 who was favourite maa?`:
```sql
|
SELECT "result" FROM "star_parivaar_awards" WHERE "year">2004; |
## Task
Generate a SQL query to answer the following question:
`What were the results after 2004?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "star_parivaar_awards" (
"year" real,
"category" text,
"character" text,
"for_the_show" text,
"result" text
);
### SQL
Given the database schema, here is the SQL query that answers `What were the results after 2004?`:
```sql
|
SELECT "category" FROM "star_parivaar_awards" WHERE "result"='won' AND "year"<2007; |
## Task
Generate a SQL query to answer the following question:
`In 2007 what category won?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "star_parivaar_awards" (
"year" real,
"category" text,
"character" text,
"for_the_show" text,
"result" text
);
### SQL
Given the database schema, here is the SQL query that answers `In 2007 what category won?`:
```sql
|
SELECT "d_48" FROM "senate_composition_at_the_beginning_of_t" WHERE "d_40"='d 37'; |
## Task
Generate a SQL query to answer the following question:
`What's the D 48 √ when the D 40 √ is D 37?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "senate_composition_at_the_beginning_of_t" (
"d_39" text,
"d_40" text,
"d_41" text,
"d_42" text,
"d_43" text,
"d_44" text,
"d_45" text,
"d_46" text,
"d_47" text,
"d_48" text
);
### SQL
Given the database schema, here is the SQL query that answers `What's the D 48 √ when the D 40 √ is D 37?`:
```sql
|
SELECT "d_42" FROM "senate_composition_at_the_beginning_of_t" WHERE "d_46"='majority→'; |
## Task
Generate a SQL query to answer the following question:
`What's the D 42 √ when D 46 √ is majority→?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "senate_composition_at_the_beginning_of_t" (
"d_39" text,
"d_40" text,
"d_41" text,
"d_42" text,
"d_43" text,
"d_44" text,
"d_45" text,
"d_46" text,
"d_47" text,
"d_48" text
);
### SQL
Given the database schema, here is the SQL query that answers `What's the D 42 √ when D 46 √ is majority→?`:
```sql
|
SELECT "d_40" FROM "senate_composition_at_the_beginning_of_t" WHERE "d_43"='d 14'; |
## Task
Generate a SQL query to answer the following question:
`What's the D 40 √ when D 43 √ is d 14?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "senate_composition_at_the_beginning_of_t" (
"d_39" text,
"d_40" text,
"d_41" text,
"d_42" text,
"d_43" text,
"d_44" text,
"d_45" text,
"d_46" text,
"d_47" text,
"d_48" text
);
### SQL
Given the database schema, here is the SQL query that answers `What's the D 40 √ when D 43 √ is d 14?`:
```sql
|
SELECT "d_42" FROM "senate_composition_at_the_beginning_of_t" WHERE "d_44"='majority→'; |
## Task
Generate a SQL query to answer the following question:
`What's the D 42 √ when D 44 √ is majority→?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "senate_composition_at_the_beginning_of_t" (
"d_39" text,
"d_40" text,
"d_41" text,
"d_42" text,
"d_43" text,
"d_44" text,
"d_45" text,
"d_46" text,
"d_47" text,
"d_48" text
);
### SQL
Given the database schema, here is the SQL query that answers `What's the D 42 √ when D 44 √ is majority→?`:
```sql
|
SELECT "d_44" FROM "senate_composition_at_the_beginning_of_t" WHERE "d_46"='d 26'; |
## Task
Generate a SQL query to answer the following question:
`What's the D 44 √ when D 46 √ is d 26?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "senate_composition_at_the_beginning_of_t" (
"d_39" text,
"d_40" text,
"d_41" text,
"d_42" text,
"d_43" text,
"d_44" text,
"d_45" text,
"d_46" text,
"d_47" text,
"d_48" text
);
### SQL
Given the database schema, here is the SQL query that answers `What's the D 44 √ when D 46 √ is d 26?`:
```sql
|
SELECT "d_42" FROM "senate_composition_at_the_beginning_of_t" WHERE "d_43"='r 5'; |
## Task
Generate a SQL query to answer the following question:
`What's the D 42 √ when D 43 √ is r 5?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "senate_composition_at_the_beginning_of_t" (
"d_39" text,
"d_40" text,
"d_41" text,
"d_42" text,
"d_43" text,
"d_44" text,
"d_45" text,
"d_46" text,
"d_47" text,
"d_48" text
);
### SQL
Given the database schema, here is the SQL query that answers `What's the D 42 √ when D 43 √ is r 5?`:
```sql
|
SELECT COUNT("founded") FROM "houses" WHERE "house_name"='benue'; |
## Task
Generate a SQL query to answer the following question:
`How many benue houses have been founded?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "houses" (
"house_name" text,
"composition" text,
"named_after" text,
"founded" real,
"colours" text
);
### SQL
Given the database schema, here is the SQL query that answers `How many benue houses have been founded?`:
```sql
|
SELECT MIN("founded") FROM "houses" WHERE "named_after"='river benue'; |
## Task
Generate a SQL query to answer the following question:
`When is the earliest year founded for houses named after the river benue?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "houses" (
"house_name" text,
"composition" text,
"named_after" text,
"founded" real,
"colours" text
);
### SQL
Given the database schema, here is the SQL query that answers `When is the earliest year founded for houses named after the river benue?`:
```sql
|
SELECT "composition" FROM "houses" WHERE "founded"=1976; |
## Task
Generate a SQL query to answer the following question:
`What composition was founded in 1976?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "houses" (
"house_name" text,
"composition" text,
"named_after" text,
"founded" real,
"colours" text
);
### SQL
Given the database schema, here is the SQL query that answers `What composition was founded in 1976?`:
```sql
|
SELECT "colours" FROM "houses" WHERE "house_name"='ogun'; |
## Task
Generate a SQL query to answer the following question:
`What colours have a House Name of ogun?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "houses" (
"house_name" text,
"composition" text,
"named_after" text,
"founded" real,
"colours" text
);
### SQL
Given the database schema, here is the SQL query that answers `What colours have a House Name of ogun?`:
```sql
|
SELECT AVG("attendance") FROM "january" WHERE "date"='january 6, 2008'; |
## Task
Generate a SQL query to answer the following question:
`What's the average attendance on january 6, 2008?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "january" (
"date" text,
"visitor" text,
"score" text,
"home" text,
"leading_scorer" text,
"attendance" real,
"record" text
);
### SQL
Given the database schema, here is the SQL query that answers `What's the average attendance on january 6, 2008?`:
```sql
|
SELECT "score" FROM "january" WHERE "visitor"='spurs'; |
## Task
Generate a SQL query to answer the following question:
`What was the score when the spurs were the visitors?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "january" (
"date" text,
"visitor" text,
"score" text,
"home" text,
"leading_scorer" text,
"attendance" real,
"record" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the score when the spurs were the visitors?`:
```sql
|
SELECT "score" FROM "january" WHERE "attendance">'16,494' AND "visitor"='nets'; |
## Task
Generate a SQL query to answer the following question:
`What was the score when the nets were the visitors and attendance was over 16,494?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "january" (
"date" text,
"visitor" text,
"score" text,
"home" text,
"leading_scorer" text,
"attendance" real,
"record" text
);
### SQL
Given the database schema, here is the SQL query that answers `What was the score when the nets were the visitors and attendance was over 16,494?`:
```sql
|
SELECT "name" FROM "united_states" WHERE "type"='lake' AND "county"='hennepin' AND "usgs_7_5_map"='rogers'; |
## Task
Generate a SQL query to answer the following question:
`Which name has a type of lake, a County of hennepin, and a USGS 7.5 Map of rogers?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "united_states" (
"name" text,
"gnis_feature_id" real,
"state" text,
"county" text,
"type" text,
"usgs_7_5_map" text
);
### SQL
Given the database schema, here is the SQL query that answers `Which name has a type of lake, a County of hennepin, and a USGS 7.5 Map of rogers?`:
```sql
|
SELECT SUM("gnis_feature_id") FROM "united_states" WHERE "county"='idaho'; |
## Task
Generate a SQL query to answer the following question:
`What is the total GNIS Feature ID with a County of idaho?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "united_states" (
"name" text,
"gnis_feature_id" real,
"state" text,
"county" text,
"type" text,
"usgs_7_5_map" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the total GNIS Feature ID with a County of idaho?`:
```sql
|
SELECT MIN("gnis_feature_id") FROM "united_states" WHERE "county"='sheridan'; |
## Task
Generate a SQL query to answer the following question:
`What is the lowest GNIS Feature ID from County of sheridan?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "united_states" (
"name" text,
"gnis_feature_id" real,
"state" text,
"county" text,
"type" text,
"usgs_7_5_map" text
);
### SQL
Given the database schema, here is the SQL query that answers `What is the lowest GNIS Feature ID from County of sheridan?`:
```sql
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.