麻辣堂|资源主站|开发论坛|在线手册
首页 Apache Linux Java MySQL 注册帮助 
PHP项目开发组是PHP开发资源网于2007组年建成立的项目开发团队,目前核心开发成员有27人, 项目协作成员8名.下设7个开发组,主要承接大/中型网站项目开发任务。

    由于开发任务较多,人员比较紧张,现面向社会招聘全职或者兼职开发人员,不管你是在校大学生,还是全职开发人员,以及SOHO都可以联系本站,我们可以长期合作,并为您带来丰厚的报酬。
  您现在的位置:PHP开发资源网 > 麻辣堂 > 详细资料
待解决
我见过的最长的Sql语句!!
悬赏分:20 - 2007年08月22日

select www_name,user_pw,c_name,join_time,user_ad,end_time,user_id,user_type,user_tel,user_email_one,birthday from user where www_name="111111" and c_name="111111" and birthday="1980-07-01" and user_ad="1111111" and user_tel="11111111" and user_email_one="111@111.111" and login_time="11" and join_time>="2007-07-29" and join_time<="" and user_living=2 and user_living=1 and user_id in(select user_id from (select user_id,login_num/(period_diff(extract(year_month from now()),extract(year_month from join_time))+1) as piju from user group by user_id) user where piju>=1 and piju<=20) and user_id in(select user_id from (select user_id,year(now())-year(birthday) as nl from user group by user_id) user where nl>=20 and nl<=40) and user_ad like "%111111%" and user_id in(select user_id from (select user_id,count(goods_id) as mj from goods where end_time>="2007-05-29" and end_time<="2008-01" group by user_id) goods where mj>=10 and mj<=20) and user_id in(select user_id from (select user_id,count(goods_id) as cgmj from goods where end_time>="2007-05-29" and end_time<="2008-01" and g_ok=1 group by user_id) goods where cgmj>=1 and cgmj<=20) and user_id in(select user_id from (select user_id,count(goods_id) as sbmj from goods where end_time>="2007-05-29" and end_time<="2008-01" and g_ok=2 group by user_id) goods where sbmj>=1 and sbmj<=20) and user_id in(select user_id from (select distinct user_id,(select sum(goods_total) as zs from goods where user_id=g.user_id and end_time>="2007-05-29" and end_time<="2008-01" group by user_id) as zs,(select sum(goods_total) as cg from goods where user_id=g.user_id and end_time>="2007-05-29" and end_time<="2008-01" and g_ok=1 group by user_id)as cg from goods as g) as g where cg/zs>=0.001 and cg/zs<=0.9) and user_id in(select user_id from (select distinct user_id,(select sum(goods_total) as zs from goods where user_id=g.user_id and end_time>="2007-05-29" and end_time<="2008-01" group by user_id) as zs,(select sum(goods_total) as sb from goods where user_id=g.user_id and end_time>="2007-05-29" and end_time<="2008-01" and g_ok=2 group by user_id)as sb from goods as g) as g where sb/zs>=0.01 and sb/zs<=0.9) and user_id in(select user_id from (select user_id,sum(goods_total) as mjs from goods where end_time>="2007-05-29" and end_time<="2008-01" group by user_id) goods where mjs>=10 and mjs<=1000) and user_id in(select user_id from (select user_id,sum(goods_total) as cgs from goods where end_time>="2007-05-29" and end_time<="2008-01" and g_ok=1 group by user_id) goods where cgs>=2 and cgs<=100) and user_id in(select user_id from (select user_id,sum(goods_total) as sbs from goods where end_time>="2007-05-29" and end_time<="2008-01" and g_ok=2 group by user_id) goods where sbs>=10 and sbs<=100) and user_id in(select user_id from (select distinct user_id,(select sum(goods_total) as mjs from goods where user_id=goo.user_id and end_time>="2007-05-29" and end_time<="2008-01" group by user_id) as mjs,(select sum(goods_total) as mjs from goods where user_id=goo.user_id and end_time>="2007-05-29" and end_time<="2008-01" and g_ok=1 group by user_id) as cgs from goods as goo) as goo where cgs/mjs>=0.01 and cgs/mjs<=0.6) and user_id in(select user_id from (select distinct user_id,(select sum(goods_total) as mjs from goods where user_id=gsb.user_id and end_time>="2007-05-29" and end_time<="2008-01" group by user_id)as mjs,(select sum(goods_total) as sbs from goods where user_id=gsb.user_id and g_ok=2 and end_time>="2007-05-29" and end_time<="2008-01" group by user_id) as sbs from goods as gsb) as gsb where sbs/mjs>=0.01 and sbs/mjs<=0.9) and user_id in(select user_id from (select user_id,sum(pub_num) as yms from goods where end_time>="2007-05-29" and end_time<="2008-01" group by user_id) goods where yms>=1 and yms<=1000) and user_id in(select user_id from (select user_id,sum(pub_num) as cgyms from goods where end_time>="2007-05-29" and end_time<="2008-01" and g_ok=1 group by user_id) goods where cgyms>=1 and cgyms<=1000) and user_id in(select user_id from (select user_id,sum(pub_num) as sbyms from goods where end_time>="2007-05-29" and end_time<="2008-01" and g_ok=2 group by user_id) goods where sbyms>=1 and sbyms<=1000) and user_id in(select user_id from (select distinct user_id,(select sum(pub_num) as yms from goods where user_id=gym.user_id and end_time>="2007-05-29" and end_time<="2008-01" group by user_id) as yms,(select sum(pub_num) as cgyms from goods where user_id=gym.user_id and end_time>="2007-05-29" and end_time<="2008-01" and g_ok=1 group by user_id) as cgyms from goods as gym) as gym where cgyms/yms>=0.01 and cgyms/yms<=0.9) and user_id in(select user_id from (select distinct user_id,(select sum(pub_num) as yms from goods where user_id=gym.user_id and end_time>="2007-05-29" and end_time<="2008-01" group by user_id) as yms,(select sum(pub_num) as sbyms from goods where user_id=gym.user_id and end_time>="2007-05-29" and end_time<="2008-01" and g_ok=2 group by user_id) as sbyms from goods as gym) as gym where sbyms/yms>=0.01 and sbyms/yms<=0.9) and user_id in(select user_id bl from (select distinct user_id,(select sum(goods_total) as mjs from goods where user_id=gmj.user_id and end_time>="2007-05-29" and end_time<="2008-01" group by user_id) as mjs,(select sum(pub_num) as cgyms from goods where user_id=gmj.user_id and end_time>="2007-05-29" and end_time<="2008-01" and g_ok=1 group by user_id) as cgyms from goods as gmj) as gmj where cgyms/mjs>=0.01 and cgyms/mjs<=0.9) and user_id in(select user_id from (select distinct user_id,(select sum(goods_total) as mjs from goods where user_id=gmj.user_id and end_time>="2007-05-29" and end_time<="2008-01" group by user_id) as mjs,(select sum(pub_num) as sbyms from goods where user_id=gmj.user_id and end_time>="2007-05-29" and end_time<="2008-01" and g_ok=2 group by user_id) as sbyms from goods as gmj) as gmj where sbyms/mjs>=0.01 and sbyms/mjs<=0.9) and user_id in(select user_id from (select distinct user_id,(select sum(goods_total) as mjs from goods where user_id=gmj.user_id and end_time>="2007-05-29" and end_time<="2008-01" group by user_id) as mjs,(select sum(pub_num) as yms from goods where user_id=gmj.user_id and end_time>="2007-05-29" and end_time<="2008-01" group by user_id) as yms from goods as gmj) as mjs where yms/mjs>=1 and yms/mjs<=1000) and user_id in(select user_id from (select user_id,count(apply_id) as ymcs from apply_one where apply_time>="2007-05-29" and apply_time<="2008-01" group by user_id) apply_one where ymcs>=1 and ymcs<=1000) and user_id in(select user_id from (select user_id,count(apply_id) as cgymcs from apply_one where apply_time>="2007-05-29" and apply_time<="2008-01" and is_ok=1 group by user_id) apply_one where cgymcs>=1 and cgymcs<=1000) and user_id in(select user_id from (select user_id,count(apply_id) as sbymcs from apply_one where apply_time>="2007-05-29" and apply_time<="2008-01" and is_ok=2 group by user_id) apply_one where sbymcs>=1 and sbymcs<=1000) and user_id in(select user_id from (select distinct user_id,(select count(apply_id) as ymcs from apply_one where apply_id=aym.apply_id and apply_time>="2007-05-29" and apply_time<="2008-01" group by user_id) as ymcs,(select count(apply_id) as cgymcs from apply_one where apply_id=aym.apply_id and apply_time>="2007-05-29" and apply_time<="2008-01" and is_ok=1 group by user_id) as cgymcs from apply_one as aym) as aym where cgymcs/ymcs>=1 and cgymcs/ymcs<=1000) and user_id in(select user_id from (select distinct user_id,(select count(apply_id) as ymcs from apply_one where apply_id=aym.apply_id and apply_time>="2007-05-29" and apply_time<="2008-01" group by user_id) as ymcs,(select count(apply_id) as sbymc

提问者:my.com.net   08-22 16:04
答复
路过。。。顺便帮顶:)
回答者:玉米づ冰冻可乐 - 瓦岗村民 8-22 09:10
我也来回答:
不管你有没有帮助我们,瓦岗寨8万村民将感谢你。。。。。

为防止灌水,您需要计算一道数学题: 答案:
1 + 84 = ? 请将计算结果填在上面

 
[]
©2007 PhpRes.COM