title: Confused about YQL Fantasy Query
body: <p>I'm looking to use the Yahoo Fantasy API to grab seasonal data for players from the previous season (pts, reb, ast, etc). I'm experimenting with their YQL but I'm having trouble trying to understand how to use it. For example:</p>
  
  <pre><code>```select * from fantasysports.players.stats where league_key='238.l.627060' and player_key='238.p.6619'```
  </code></pre>
  
  <p>gives an output of: </p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>{
   "query": {
    "count": 1,
    "created": "2016-05-30T07:46:12Z",
    "lang": "en-US",
    "diagnostics": {
     "publiclyCallable": "true",
     "url": {
      "execution-start-time": "2",
      "execution-stop-time": "1643",
      "execution-time": "1641",
      "content": "http://fantasysports.yahooapis.com/fantasy/v2/leagues;league_keys=238.l.627060/players;player_keys=238.p.6619/stats"
     },
     "javascript": {
      "execution-start-time": "0",
      "execution-stop-time": "1645",
      "execution-time": "1644",
      "instructions-used": "257",
      "table-name": "fantasysports.players.stats"
     },
     "user-time": "1646",
     "service-time": "1641",
     "build-version": "0.2.998"
    },
    "results": {
     "player": {
      "player_key": "238.p.6619",
      "player_id": "6619",
      "name": {
       "full": "Albert Pujols",
       "first": "Albert",
       "last": "Pujols",
       "ascii_first": "Albert",
       "ascii_last": "Pujols"
      },
      "editorial_player_key": "mlb.p.6619",
      "editorial_team_key": "mlb.t.3",
      "editorial_team_full_name": "Los Angeles Angels",
      "editorial_team_abbr": "LAA",
      "uniform_number": "5",
      "display_position": "1B",
      "headshot": {
       "url": "http://l.yimg.com/iu/api/res/1.2/tEqcQTL99PN5L26BdMaRiA--/YXBwaWQ9c2hhcmVkO2NoPTIzMzY7Y3I9MTtjdz0xNzkwO2R4PTg1NztkeT0wO2ZpPXVsY3JvcDtoPTYwO3E9MTAwO3c9NDY-/https://s.yimg.com/xe/i/us/sp/v/mlb_cutout/players_l/20160401/6619.png",
       "size": "small"
      },
      "image_url": "http://l.yimg.com/iu/api/res/1.2/tEqcQTL99PN5L26BdMaRiA--/YXBwaWQ9c2hhcmVkO2NoPTIzMzY7Y3I9MTtjdz0xNzkwO2R4PTg1NztkeT0wO2ZpPXVsY3JvcDtoPTYwO3E9MTAwO3c9NDY-/https://s.yimg.com/xe/i/us/sp/v/mlb_cutout/players_l/20160401/6619.png",
      "is_undroppable": "0",
      "position_type": "B",
      "eligible_positions": {
       "position": [
        "1B",
        "Util"
       ]
      },
      "has_player_notes": "1",
      "player_stats": {
       "coverage_type": "season",
       "season": "2010",
       "stats": {
        "stat": [
         {
          "stat_id": "60",
          "value": "183/587"
         },
         {
          "stat_id": "7",
          "value": "115"
         },
         {
          "stat_id": "12",
          "value": "42"
         },
         {
          "stat_id": "13",
          "value": "118"
         },
         {
          "stat_id": "16",
          "value": "14"
         },
         {
          "stat_id": "3",
          "value": ".312"
         }
        ]
       }
      }
     }
    }
   }
  }</code></pre>
  </div>
  </div>
  </p>
  
  <p>whereas I've tried playing around with the other options with no luck. Any idea as to how to get player stats in JSON format with this?</p>