Chinastark/bird_dataset huggingface dataset:
Database: professional_basketball
Question: What is the number of NBA titles that Ray Allen has won throughout his NBA career?
Evidence: NBA refers to lgID = 'NBA'
SQL: SELECT COUNT(T1.playerID) FROM player_allstar AS T1 INNER JOIN awards_players AS T2 ON T1.playerID = T2.playerID WHERE first_name = 'Ray' AND last_name = 'Allen'
Database: professional_basketball
Question: How much did the win rate increase for the team after getting the No.1 NBA draft pick in the 2003 season than previous season?
Evidence: No.1 draft pick refers to draftRound = 1; in the 2003 season refers to draftyear = 2003; increase = subtract(divide(sum(won), add(sum(won), sum(lost))) where draftyear = 2004, divide(sum(won), add(sum(won), sum(lost))) where draftyear = 2003)
SQL: SELECT (CAST(SUM(CASE WHEN T1.year = 2004 THEN T1.won ELSE 0 END) AS REAL) / SUM(CASE WHEN T1.year = 2004 THEN T1.won + T1.lost ELSE 0 END)) - (CAST(SUM(CASE WHEN T1.year = 2003 THEN T1.won ELSE 0 END) AS REAL) / SUM(CASE WHEN T1.year = 2003 THEN T1.won + T1.lost ELSE 0 END)) FROM teams AS T1 INNER JOIN draft AS T2 ON T1.tmID = T2.tmID WHERE T2.draftRound = 1 AND T2.draftYear = 2003
Database: professional_basketball
Question: Among the coaches who won the 'NBA coach of the year' award from 1971 - 1975, how many of them were in 'POR' team?
Evidence: the 'NBA coach of the year' award refers to award = 'NBA coach of the year'; from 1971 - 1975 refers to year between 1971 and 1975; 'POR' team refers to tmID = 'POR'
SQL: SELECT COUNT(T1.id) FROM awards_coaches AS T1 INNER JOIN teams AS T2 ON T1.year = T2.year WHERE T1.year BETWEEN 1971 AND 1975 AND T1.award = 'NBA Coach of the Year' AND T2.tmID = 'POR'
Database: professional_basketball
Question: How many percent of points were scored by NBA players who belonged to 'LAL' team and had performed steals movement.
Evidence: NBA refers to lgID = 'NBA'; 'LAL' team refers to tmID = 'LAL'; performed steals movement refers to steals > 0; percent = divide(count(playerID where steals > 0), count(playerID)) where lgID = 'NBA' and tmID = 'LAL' * 100%
SQL: SELECT CAST(SUM(IIF(T2.steals IS NOT NULL AND T1.tmID = 'LAL', 1, 0)) AS REAL) * 100 / COUNT(T1.tmID) FROM teams AS T1 INNER JOIN players_teams AS T2 ON T1.tmID = T2.tmID AND T1.year = T2.year
Database: professional_basketball
Question: What's the name of the player in 1996 who had the most steals that didn't play in the playoffs?
Evidence: name of the player refers to first_name, middle_name, last_name; in 1996 refers to year = 1996; the most steals refers to max(steals); didn't play in the playoffs refers to playoff = null
SQL: SELECT T1.playerID FROM players AS T1 INNER JOIN players_teams AS T2 ON T1.playerID = T2.playerID WHERE T2.year = 1996 AND T2.PostGP = 0 ORDER BY T2.steals DESC LIMIT 1
Database: professional_basketball
Question: Give the player id of the man who had the most turnovers whose team missed the playoffs in year 1988.
Evidence: the most turnovers refers to max(turnovers); missed the playoffs refers to PostGP = 0; in year 1988 refers to year = 1988
SQL: SELECT T2.playerID FROM players_teams AS T1 INNER JOIN players AS T2 ON T1.playerID = T2.playerID WHERE T1.PostGP = 0 AND T1.year = 1988 ORDER BY T1.turnovers DESC LIMIT 1
Database: professional_basketball
Question: Which NBA team that didn't play in playoffs had the most winning rate in the 2000 NBA regular season?
Evidence: NBA refers to lgID = 'NBA'; didn't play in the playoffs refers to PostGP = 0; 2000 refers to year = 2000; the most winning rate refers to max(divide(won, add(won, lost)))
SQL: SELECT T2.tmID FROM players_teams AS T1 INNER JOIN teams AS T2 ON T1.tmID = T2.tmID AND T1.year = T2.year WHERE T1.PostGP = 0 AND T1.year = 2000 ORDER BY CAST(T2.won AS REAL) / (T2.won + T2.lost) DESC LIMIT 1
Database: professional_basketball
Question: Which non-playoffs team had the most points in the regular season in the year 1998?
Evidence: non-playoff refers to PostGP = 0; in the year 1998 refers to year = 1998; the most points refers to max(o_pts)
SQL: SELECT T2.tmID FROM players_teams AS T1 INNER JOIN teams AS T2 ON T1.tmID = T2.tmID AND T1.year = T2.year WHERE T1.year = 1998 AND T1.PostGP = 0 ORDER BY T1.points DESC LIMIT 1
Database: professional_basketball
Question: What's the full name of the team that won the most games in 2001 but didn't make the playoffs?
Evidence: full name of the team refers to teams.name; in 2001 refers to year = 2001; didn't make the playoffs refers to PostGP = 0; won the most games refers to max(won)
SQL: SELECT T2.tmID FROM players_teams AS T1 INNER JOIN teams AS T2 ON T1.tmID = T2.tmID AND T1.year = T2.year WHERE T1.PostGP = 0 ORDER BY T2.won DESC LIMIT 1
Database: professional_basketball
Question: Which team that didn't play in playoffs had the most total rebounds in the year 1997?
Evidence: didn't play in playoffs refers to PostGP = 0; in the year 1997 refers to year = 1997; the most total rebounds refers to max(o_tmRebound)
SQL: SELECT T2.tmID FROM players_teams AS T1 INNER JOIN teams AS T2 ON T1.tmID = T2.tmID AND T1.year = T2.year WHERE T1.PostGP = 0 AND T1.year = 1997 ORDER BY T1.rebounds DESC LIMIT 1
Database: professional_basketball
Question: For the player who was drafted in the 1st round, 6th position in 1976, which team did he play in that year?
Evidence: drafted in the 1st round refers to draftRound = 1; 6th position refers to draftSelection = 6; in 1976 refers to year = 1976; team refers to tmID
SQL: SELECT T2.tmID FROM draft AS T1 INNER JOIN teams AS T2 ON T1.tmID = T2.tmID AND T1.draftYear = T2.year WHERE T1.draftRound = 1 AND T1.draftSelection = 6 AND T1.draftYear = 1976
Database: professional_basketball
Question: In the year 1998, how many home wins did the team which had the 1st round, 12th pick have that year?
Evidence: in 1998 refers to year = 1998; 1st round refers to draftRound = 1; 12th pick refers to draftSelection = 12; home win refers to homeWon
SQL: SELECT T2.homeWon FROM draft AS T1 INNER JOIN teams AS T2 ON T1.tmID = T2.tmID AND T1.draftYear = T2.year WHERE T1.draftRound = 1 AND T1.draftSelection = 12 AND T1.draftYear = 1998
Database: professional_basketball
Question: For the player who had the most rebounds throughout his allstar appearances, what was his weight and height?
Evidence: the most rebounds refers to max(rebounds)
SQL: SELECT T1.weight, T1.height FROM players AS T1 INNER JOIN player_allstar AS T2 ON T1.playerID = T2.playerID ORDER BY T2.rebounds DESC LIMIT 1
Database: professional_basketball
Question: Where was the high school of the player who had the most rebounds in the NBA allstar history?
Evidence: the most rebounds refers to max(rebounds)
SQL: SELECT T2.highSchool FROM player_allstar AS T1 INNER JOIN players AS T2 ON T1.playerID = T2.playerID ORDER BY T1.rebounds DESC LIMIT 1
Database: professional_basketball
Question: In the year 1997 allstar game, which teams did the players had the most rebounds play in? List their team ids.
Evidence: in 1997 refers to year = 1997; the most rebounds refers to max(rebounds); team id refers to tmID
SQL: SELECT T2.tmID FROM players_teams AS T1 INNER JOIN teams AS T2 ON T1.tmID = T2.tmID AND T1.year = T2.year INNER JOIN player_allstar AS T3 ON T3.playerID = T1.playerID WHERE T3.season_id = 1997 ORDER BY T1.rebounds DESC LIMIT 1
Database: professional_basketball
Question: For the latest passing player who could play all the positions in the court, how many points did he have in his career?
Evidence: the latest passing refers to max(season_id); play all the positions refers to pos like '%C%' or pos like '%F%' or pos like '%G%'
SQL: SELECT SUM(T2.points) FROM players AS T1 INNER JOIN players_teams AS T2 ON T1.playerID = T2.playerID WHERE T1.pos = 'C-F-G' GROUP BY T2.playerID, T2.year ORDER BY T2.year DESC LIMIT 1
Database: professional_basketball
Question: Which team did the youngest player who could be in F-G position play in the NBA?
Evidence: team refers to tmID; the youngest refers to max(year); F-G position refers to pos like '%F'; NBA refers to lgID = 'NBA'
SQL: SELECT T1.tmID FROM teams AS T1 INNER JOIN players_teams AS T2 ON T1.tmID = T2.tmID AND T1.year = T2.year INNER JOIN players AS T3 ON T2.playerID = T3.playerID WHERE T3.pos = 'F-G' AND T2.lgID = 'NBA' ORDER BY T3.birthDate DESC LIMIT 1
Database: professional_basketball
Question: For the players who played the most PBLA games, who was graduated from Central Missouri State college?
Evidence: the most PBLA games refers to max(games_played); Central Missouri State college refers to college = 'Central Missouri State'
SQL: SELECT T1.firstName, T1.middleName, T1.lastName FROM players AS T1 INNER JOIN players_teams AS T2 ON T1.playerID = T2.playerID WHERE T2.lgID = 'PBLA' AND T2.GP = 10 AND T1.college = 'Central Missouri State' GROUP BY T1.firstName, T1.middleName, T1.lastName ORDER BY COUNT(T2.id) DESC LIMIT 1
Database: professional_basketball
Question: In 2000, which team did the player who played the least minutes without missing a single game play in? Give the full name of the team.
Evidence: in 2000 refers to year = 2000; played the least minutes refers to min(minutes); without missing a single game refers to GP = 82; full name of the team refers to teams.name
SQL: SELECT T1.tmID FROM teams AS T1 INNER JOIN players_teams AS T2 ON T1.tmID = T2.tmID AND T1.year = T2.year WHERE T2.GP = 82 AND T2.year = 2000 GROUP BY T1.tmID ORDER BY SUM(T2.PostMinutes) ASC LIMIT 1
Database: professional_basketball
Question: For all the full attendence players in 1995, which player had most turnovers? Give the full name of the player.
Evidence: full attendance refers to GP = 82; in 1995 refers to year = 1995; the most turnovers refers to max(turnovers); full name refers to first_name, last_name
SQL: SELECT T1.firstName, T1.middleName, T1.lastName FROM players AS T1 INNER JOIN players_teams AS T2 ON T1.playerID = T2.playerID WHERE T2.GP = 82 AND T2.year = 1995 ORDER BY T2.turnovers DESC LIMIT 1
Database: professional_basketball
Question: For the player in 2011 who started every game he played, which team had the player who had the most steals?
Evidence: in 2011 refers to year = 2011; started every game refers to GP = GS; the most steals refers to max(steals); team refers to tmID
SQL: SELECT T1.tmID FROM teams AS T1 INNER JOIN players_teams AS T2 ON T1.tmID = T2.tmID AND T1.year = T2.year WHERE T1.year = 2011 AND T2.GP = T2.GS GROUP BY T1.tmID, T2.steals ORDER BY T2.steals DESC LIMIT 1
Database: professional_basketball
Question: Which team had the most same starting players througout the season? Give the full name of the team.
Evidence: the same starting player refers to GP = GS; full name of the team refers to teams.name
SQL: SELECT DISTINCT T1.tmID FROM teams AS T1 INNER JOIN players_teams AS T2 ON T1.tmID = T2.tmID AND T1.year = T2.year WHERE T2.GP = T2.GS
Database: professional_basketball
Question: For the 2001 rebounds leader in the league, when was his birthday?
Evidence: 2001 refers to year = 2001; rebounds leader refers to max(rebounds); birthday refers to birthDate
SQL: SELECT birthDate FROM players WHERE playerID = ( SELECT playerID FROM players_teams WHERE year = 2001 GROUP BY playerID ORDER BY SUM(rebounds + dRebounds) DESC LIMIT 1 )
Database: professional_basketball
Question: Which team did the all league rebound champion play in 1997? Give the full name of the team.
Evidence: rebound champion refers to max(rebounds); 1997 refers to 1997; full name refers to teams.name
SQL: SELECT T1.name FROM teams AS T1 INNER JOIN players_teams AS T2 ON T1.tmID = T2.tmID AND T1.year = T2.year WHERE T2.year = 1997 GROUP BY T1.name ORDER BY SUM(rebounds + dRebounds) DESC LIMIT 1
Database: professional_basketball
Question: Which team had more than one player who grabbed more than 600 rebounds in 2011? Give the full name of the team.
Evidence: more than one player refers to count(playerID) > 1; grabbed more than 600 rebounds refers to rebounds > 600; in 2011 refers to 2011; full name refers to teams.name
SQL: SELECT T1.tmID FROM teams AS T1 INNER JOIN players_teams AS T2 ON T1.tmID = T2.tmID AND T1.year = T2.year WHERE T1.year = 2011 AND T2.rebounds > 600
Database: shakespeare
Question: How many of Shakespeare's works were finished before the year 1602?
Evidence: finished before the year 1602 refers to Date < 1602
SQL: SELECT COUNT(id) FROM works WHERE Date < 1602
Database: shakespeare
Question: How many scenes are there in Act 1 in Twelfth Night?
Evidence: Twelfth Night refers to Title = 'Twelfth Night'
SQL: SELECT COUNT(T1.id) FROM works AS T1 INNER JOIN chapters AS T2 ON T1.id = T2.work_id WHERE T2.Act = 1 AND T1.Title = 'Twelfth Night'
Database: shakespeare
Question: What is the description of Act 1, Scene 2 in Twelfth Night?
Evidence: Twelfth Night refers to Title = 'Twelfth Night'
SQL: SELECT T2.Description FROM works AS T1 INNER JOIN chapters AS T2 ON T1.id = T2.work_id WHERE T1.Title = 'Twelfth Night' AND T2.Act = 1 AND T2.Scene = 2
Database: shakespeare
Question: How many more scenes are there in Act 1 than in Act 5 in Twelfth Night?
Evidence: in Twelfth Night refers to Title = 'Twelfth Night'; How many more scenes = subtract(sum(Act = 1), sum(Act = 5))
SQL: SELECT SUM(IIF(T2.Act = 1, 1, 0)) - SUM(IIF(T2.Act = 5, 1, 0)) AS more FROM works AS T1 INNER JOIN chapters AS T2 ON T1.id = T2.work_id WHERE T1.Title = 'Twelfth Night'
Database: shakespeare
Question: Which work is the character Lord Abergavenny from? Please give its short or abbreviated title.
Evidence: Lord Abergavenny refers to CharName = 'Lord Abergavenny'; short or abbreviated title refers to Title
SQL: SELECT DISTINCT T1.Title FROM works AS T1 INNER JOIN chapters AS T2 ON T1.id = T2.work_id INNER JOIN paragraphs AS T3 ON T2.id = T3.chapter_id INNER JOIN characters AS T4 ON T3.character_id = T4.id WHERE T4.CharName = 'Lord Abergavenny'
Database: shakespeare
Question: Please list the character names of all the characters from the work Twelfth Night.
Evidence: character names refers to CharName; Twelfth Night refers to Title = 'Twelfth Night'
SQL: SELECT DISTINCT T4.CharName FROM works AS T1 INNER JOIN chapters AS T2 ON T1.id = T2.work_id INNER JOIN paragraphs AS T3 ON T2.id = T3.chapter_id INNER JOIN characters AS T4 ON T3.character_id = T4.id WHERE T1.Title = 'Twelfth Night'
Database: shakespeare
Question: How many paragraphs are there in Act 1, Scene 1 in Twelfth Night?
Evidence: Twelfth Night refers to Title = 'Twelfth Night'
SQL: SELECT SUM(T3.ParagraphNum) FROM works AS T1 INNER JOIN chapters AS T2 ON T1.id = T2.work_id INNER JOIN paragraphs AS T3 ON T2.id = T3.chapter_id WHERE T2.Act = 1 AND T2.Scene = 1 AND T1.Title = 'Twelfth Night'
Database: shakespeare
Question: Please list all the paragraphs in Act 1, Scene 1 in Twelfth Night.
Evidence: Twelfth Night refers to Title = 'Twelfth Night'; list the paragraphs refers to PlainText
SQL: SELECT T3.PlainText FROM works AS T1 INNER JOIN chapters AS T2 ON T1.id = T2.work_id INNER JOIN paragraphs AS T3 ON T2.id = T3.chapter_id WHERE T2.Act = 1 AND T2.Scene = 1 AND T1.Title = 'Twelfth Night'
Database: shakespeare
Question: How many paragraphs contain the character Lord Abergavenny?
Evidence: Lord Abergavenny refers to CharName = 'Lord Abergavenny'
SQL: SELECT SUM(T1.ParagraphNum) FROM paragraphs AS T1 INNER JOIN characters AS T2 ON T1.character_id = T2.id WHERE T2.CharName = 'Lord Abergavenny'
Database: shakespeare
Question: Please list the IDs of the paragraphs in which the character "son to Tamora" appears.
Evidence: character "son to Tamora"  refers to characters.Description = 'son to Tamora'
SQL: SELECT T1.id FROM paragraphs AS T1 INNER JOIN characters AS T2 ON T1.character_id = T2.id WHERE T2.Description = 'son to Tamora'
Database: shakespeare
Question: For how many times has the scene "OLIVIA’S house." appeared in Twelfth Night?
Evidence: "OLIVIA’S house."  refers to chapters.Description = 'OLIVIA’S house.'; Twelfth Night refers to Title = 'Twelfth Night'
SQL: SELECT COUNT(T2.id) FROM works AS T1 INNER JOIN chapters AS T2 ON T1.id = T2.work_id WHERE T2.Description = 'OLIVIA’S house.' AND T1.Title = 'Twelfth Night'
Database: shakespeare
Question: How many characters are there in Twelfth Night?
Evidence: Twelfth Night refers to Title = 'Twelfth Night'
SQL: SELECT COUNT(DISTINCT T4.id) FROM works AS T1 INNER JOIN chapters AS T2 ON T1.id = T2.work_id INNER JOIN paragraphs AS T3 ON T2.id = T3.chapter_id INNER JOIN characters AS T4 ON T3.character_id = T4.id WHERE T1.Title = 'Twelfth Night'
Database: shakespeare
Question: Please give the title of the work of Shakespeare that has the most characters.
Evidence: most characters refers to max(count(character_id))
SQL: SELECT T.Title FROM ( SELECT T1.Title, COUNT(T3.character_id) AS num FROM works T1 INNER JOIN chapters T2 ON T1.id = T2.work_id INNER JOIN paragraphs T3 ON T2.id = T3.chapter_id INNER JOIN characters T4 ON T3.character_id = T4.id GROUP BY T3.character_id, T1.Title ) T ORDER BY T.num DESC LIMIT 1
Database: shakespeare
Question: What is the average number of characters in all the works of Shakespeare?
Evidence: average number = divide(sum(character_id), count(work_id))
SQL: SELECT SUM(DISTINCT T4.id) / COUNT(T1.id) FROM works AS T1 INNER JOIN chapters AS T2 ON T1.id = T2.work_id INNER JOIN paragraphs AS T3 ON T2.id = T3.chapter_id INNER JOIN characters AS T4 ON T3.character_id = T4.id
Database: shakespeare
Question: How many scenes are there on average in one act in Twelfth Night?
Evidence: Twelfth Night refers to Title = 'Twelfth Night'; average scene = divide(sum(Scene), count(Act))
SQL: SELECT SUM(T2.Scene) / COUNT(T2.Act) FROM works AS T1 INNER JOIN chapters AS T2 ON T1.id = T2.work_id WHERE T1.Title = 'Twelfth Night'
Database: shakespeare
Question: How many comedies did Shakespeare create?
Evidence: comedies refers to GenreType = 'Comedy'
SQL: SELECT COUNT(id) FROM works WHERE GenreType = 'Comedy'
Database: shakespeare
Question: When did Shakespeare write the first poem?
Evidence: first poem refers to GenreType = 'Poem' and Date = 'min'
SQL: SELECT MIN(Date) FROM works WHERE GenreType = 'Poem'
Database: shakespeare
Question: Give the abbreviation name for the character "Earl of Westmoreland".
Evidence: abbreviation name refers to Abbrev; character "Earl of Westmoreland" refers to CharName = 'Earl of Westmoreland'
SQL: SELECT DISTINCT Abbrev FROM characters WHERE CharName = 'Earl of Westmoreland'
Database: shakespeare
Question: Which chapter has the most paragraphs? Give the description of the chapter.
Evidence: most paragraphs refers to max(count(chapter_id))
SQL: SELECT T1.Description FROM chapters AS T1 INNER JOIN paragraphs AS T2 ON T1.id = T2.chapter_id ORDER BY T2.ParagraphNum DESC LIMIT 1
Database: shakespeare
Question: Which character was mentioned in the paragraph "Would he do so, I'ld beg your precious mistress, Which he counts but a trifle."? Give the character name.
Evidence: paragraph "Would he do so, I'ld beg your precious mistress, Which he counts but a trifle."  refers to PlainText = 'Would he do so, I'ld beg your precious mistress, Which he counts but a trifle.'
SQL: SELECT T1.CharName FROM characters AS T1 INNER JOIN paragraphs AS T2 ON T1.id = T2.character_id WHERE T2.PlainText = 'Would he do so, I''ld beg your precious mistress,Which he counts but a trifle.'
Database: shakespeare
Question: How many characters are there in Titus Andronicus?
Evidence: Titus Andronicus refers to Title = 'Titus Andronicus'
SQL: SELECT COUNT(DISTINCT T3.character_id) FROM works AS T1 INNER JOIN chapters AS T2 ON T1.id = T2.work_id INNER JOIN paragraphs AS T3 ON T2.id = T3.chapter_id WHERE T1.Title = 'Titus Andronicus'
Database: shakespeare
Question: List the number of acts in Two Gentlemen of Verona.
Evidence: Two Gentlemen of Verona refers to LongTitle = 'Two Gentlemen of Verona'
SQL: SELECT DISTINCT T1.Act FROM chapters AS T1 INNER JOIN works AS T2 ON T1.id = T1.work_id WHERE T2.LongTitle = 'Two Gentlemen of Verona'
Database: shakespeare
Question: What is the description for the character mentioned in paragraph No.640171?
Evidence: paragraph No.640171 refers to paragraphs.id = '640171'
SQL: SELECT T1.Description FROM characters AS T1 INNER JOIN paragraphs AS T2 ON T1.id = T2.character_id WHERE T2.id = '640171'
Database: shakespeare
Question: Give the title of the work that contains the character "Shylock".
Evidence: character "Shylock" refers to CharName = 'Shylock'
SQL: SELECT DISTINCT T1.Title FROM works AS T1 INNER JOIN chapters AS T2 ON T1.id = T2.work_id INNER JOIN paragraphs AS T3 ON T2.id = T3.chapter_id INNER JOIN characters AS T4 ON T3.character_id = T4.id WHERE T4.CharName = 'Shylock'
Database: shakespeare
Question: How many scenes are there in King John?
Evidence: King John refers to Title = 'King John'
SQL: SELECT COUNT(T2.Scene) FROM works AS T1 INNER JOIN chapters AS T2 ON T1.id = T2.work_id WHERE T1.Title = 'King John'
Database: shakespeare
Question: How many chapters does the character Demetrius show in the story?
Evidence: character Demetrius refers to CharName = 'Demetrius'
SQL: SELECT COUNT(DISTINCT T2.chapter_id) FROM characters AS T1 INNER JOIN paragraphs AS T2 ON T1.id = T2.character_id WHERE T1.CharName = 'Demetrius'
Database: shakespeare
Question: Which Shakespeare story with character ID 324 has description of 'this friend of Caesar'?
SQL: SELECT T1.Title FROM works AS T1 INNER JOIN chapters AS T2 ON T1.id = T2.work_id INNER JOIN paragraphs AS T3 ON T2.id = T3.chapter_id INNER JOIN characters AS T4 ON T3.character_id = T4.id WHERE T2.id = '324' AND T2.Description = 'friend to Caesar'
Database: shakespeare
Question: Give the description for the Act No.2, Scene No.2 of Midsummer Night's Dream.
Evidence: Act No.2 refers to Act = '2'; Scene No.2  refers to Scene = '2'; Midsummer Night's Dream refers to Title = 'Midsummer Night''s Dream'
SQL: SELECT T2.Description FROM works AS T1 INNER JOIN chapters AS T2 ON T1.id = T2.work_id WHERE T2.Act = '2' AND T2.Scene = '2' AND T1.Title = 'Midsummer Night''s Dream'
Database: shakespeare
Question: Which Shakespeare tragedy has the most scenes? Give the long title.
Evidence: tragedy refers to GenreType = 'Tragedy'; most scenes refers to max(count(Scene))
SQL: SELECT T.LongTitle FROM ( SELECT T1.LongTitle, COUNT(T2.Scene) AS num FROM works AS T1 INNER JOIN chapters AS T2 ON T1.id = T2.work_id WHERE T1.GenreType = 'Tragedy' GROUP BY T1.LongTitle, T2.Scene ) AS T ORDER BY T.num DESC LIMIT 1
Database: shakespeare
Question: How many paragraphs are there in the scene whose description is "A Sea-port in Cyprus. An open place near the quay."?
SQL: SELECT SUM(T2.ParagraphNum) FROM chapters AS T1 INNER JOIN paragraphs AS T2 ON T1.id = T2.chapter_id WHERE T1.Description = 'A Sea-port in Cyprus. An open place near the quay.'
Database: shakespeare
Question: What percentage of all scenes are tragic scenes in Shakespeare's work in 1594?
Evidence: tragic scenes refers to GenreType = 'Tragedy'; work in 1594 refers to Date = '1594'; percentage = divide((sum(Scene) when GenreType = 'Tragedy'), count(Scene))as percentage
SQL: SELECT CAST(SUM(IIF(T2.GenreType = 'Tragedy', 1, 0)) AS REAL) * 100 / COUNT(T1.Scene) FROM chapters AS T1 INNER JOIN works AS T2 ON T1.work_id = T2.id WHERE T2.Date = '1594'
Database: shakespeare
Question: Gives the average number of chapters in Shakespeare's 1599 work.
Evidence: 1599 work refers to Date = '1599'; average number refers to divide(count(chapters.id), count(works.id))
SQL: SELECT CAST(COUNT(T1.id) AS REAL) / COUNT(DISTINCT T2.id) FROM chapters AS T1 INNER JOIN works AS T2 ON T1.work_id = T2.id WHERE T2.Date = '1599'
Database: shakespeare
Question: How many "servant to Timon" characters are there?
Evidence: servant to Timon refers to characters.Description = 'servant to Timon'
SQL: SELECT COUNT(id) FROM characters WHERE Description = 'servant to Timon'
Database: shakespeare
Question: What is the title of the first ever work of William Shakespeare?
Evidence: first ever work refers to min(Date)
SQL: SELECT Title FROM works WHERE Date = ( SELECT MIN(Date) FROM works )
Database: shakespeare
Question: How many poems did Shakespeare write?
Evidence: poems refers to GenreType = 'Poem'
SQL: SELECT COUNT(id) FROM works WHERE GenreType = 'Poem'
Database: shakespeare
Question: How many scenes are there in work id 7, act 1?
SQL: SELECT COUNT(id) FROM chapters WHERE work_id = 7 AND Act = 1