File size: 1,397 Bytes
5c249e5
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
{
  "id": "bird-dev-1076",
  "db_id": "european_football_2",
  "difficulty": "challenging",
  "conversations": [
    {
      "from": "human",
      "value": "Write one SQLite query that answers the question. Reply with only the query in a ```sql block.\n\nQuestion: What is the difference of the average ball control score between Abdou Diallo and Aaron Appindangoye\n?"
    },
    {
      "from": "gpt",
      "value": "```sql\nSELECT CAST(SUM(CASE WHEN t1.player_name = 'Abdou Diallo' THEN t2.ball_control ELSE 0 END) AS REAL) / COUNT(CASE WHEN t1.player_name = 'Abdou Diallo' THEN t2.id ELSE NULL END) - CAST(SUM(CASE WHEN t1.player_name = 'Aaron Appindangoye' THEN t2.ball_control ELSE 0 END) AS REAL) / COUNT(CASE WHEN t1.player_name = 'Aaron Appindangoye' THEN t2.id ELSE NULL END) FROM Player AS t1 INNER JOIN Player_Attributes AS t2 ON t1.player_api_id = t2.player_api_id\n```"
    }
  ],
  "plan": "Join `Player_Attributes` with `Player` on `Player_Attributes.player_api_id = Player.player_api_id`. Use the `player_name` column to filter for 'Abdou Diallo' and 'Aaron Appindangoye'. The `ball_control` column in `Player_Attributes` contains the values. Use the hint to calculate the average for each player and subtract them. Note that the `player_api_id` is the key to join the tables.",
  "hidden_state_file": "record_example_states.pt",
  "hidden_state_shape": [
    96,
    2560
  ]
}