简体   繁体   English

SQL:根据条件过滤

[英]SQL: Filter based on criteria

I am using Yahoo's YQL to retrieve data about my Fantasy Football league. 我正在使用Yahoo的YQL检索有关我的梦幻足球联赛的数据。 YQL is very similar to SQL. YQL与SQL非常相似。

Here is the output of ` 是`的输出

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

How would I filter this to just display "points_for" for a team if I supply team_id 如果提供team_id,我该如何过滤以仅显示团队的“ points_for”

I thought it would be 我以为会

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

but that did not work. 但这没有用。

You could try something like this 你可以尝试这样的事情

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

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM