发帖数: 1 | 1 两个表,
users: userid, username, zipcode
friends: userid, friendid (also an userid), friendname
找出一个 user 的所有在某个 zipcode 的 friends id.
我想出来的答案:
select userid, zipcode from users A where A.userid in (select friendid from
friends B where B.userid = "****") and A.zipcode = "***";
大家觉得这个答案如何? |
|
V****r 发帖数: 925 | 2 Select distinct(friendid)
from users u
join friends f on u.userid = f.userid
where u.userid = xxxxxxx
and u.zipcode = xxxxxxx
话说TABLE users 的primary key是userid吧? 那么zipcode可以不用管:
Select distinct(friendid)
from users u
join friends f on u.userid = f.userid
where u.userid = xxxxxxx |
|
|
|
l****n 发帖数: 621 | 5 大家点我的链接吧。这样也可以挣点bonus,呵呵。
http://www.buyzooka.com/refer-a-friend_newAccount.php?friendid=1769&recid=802
Details
- Voucher expires 1/31/2011
- 1 per person/email/account
- Redeem online, toll free number, or retail store
- No minimum purchase online
- $50 minimum purchase at store or buy 2 tails for $20 & get 2 free!
- Good for 1 use
- Not valid for gift card purchase
- Cannot be used with any other offer
- See the Rules that Apply to All Buys |
|
x**s 发帖数: 1085 | 6 【 以下文字转载自 SanFrancisco 讨论区 】
发信人: serendipity2 (bunny), 信区: SanFrancisco
标 题: 一个美国人的英文blog on torch relay。 calling ZD terroris
发信站: BBS 未名空间站 (Thu Apr 10 08:45:56 2008)
http://blog.myspace.com/index.cfm?fuseaction=blog.view&friendID=49870907&blogID=376293545
The torch disappears for 58 minutes after the run was scheduled to start. When it finally shows up again, it is miles away from the planned relay route, far away from any spectators who had traveled hundreds, if not thousands, of miles to s |
|
|
|
|
|
|
|
|
n********k 发帖数: 2818 | 14 Absolutely agree and I was wondering whether any body like to punish that
bastard UK reporter, such as
organizing a phone or email protest to him and any press he works for...that
BT motherfucker so took
advantage of MJ, he shall be hold accountable for his inhuman behavior...
His
fuseaction=blog.view&friendId=42291868&blogId=497035326 |
|