开发者

Freebase; select a random record?

1) Is there any way to select a random record from Freebase? If I do a limit of 1, it consistently returns the same record. I could grab the larger data set and select a random rec from that but that seems like overkill. Analogous to MySQL's :

select * from profiles order by rand() limit 1;

2) Is there any way to tell Freebase not to select certain items in a set?

Analogous to MySQL's :

select * from profiles  where id NOT IN (SELECT profile_id from approved_profiles)

Thanks in adv开发者_运维百科ance


Sorry, right now MQL doesn't have a random operator. This thread on the Freebase discussion list suggests using a random as_of_time parameter as a work-around.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜