2014-10-01 103 views
0

我使用雅虎的YQL检索我的Fantasy Football联盟的数据。 YQL与SQL非常相似。SQL:根据条件筛选

Here是`

select * 
from fantasysports.leagues.standings 
where league_key='331.l.777399' 

我将如何筛选这只是显示 “points_for” 对于一个团队,如果我提供TEAM_ID

我认为这将是输出

select * 
from fantasysports.leagues.standings 
where league_key='331.l.777399' 
and standings.teams.team.%.team_id='2' 

但这没有奏效。

回答

1

你可以尝试这样的事情

select points_for 
from fantasysports.leagues.standings 
where league_key='331.l.777399' 
and standings.teams.team.%.team_id='2' 
+0

下一次,不作一行代码就一个巨型足够大的跑道。 – gsamaras 2014-10-01 18:24:16

+0

不,不,在我使用的代码中,即使当我做'standings.teams.team。%。team_id ='2''时,它也不提供任何东西 – Bijan 2014-10-01 21:15:22