SQL²éѯÅÅÐÐ
SQL code:
sql="select name,channelid from model_channel where channelid in (select rootchannel from model_content group by rootchannel order by sum(hits) desc) and rootchannel=81"
ACCESSÊý¾Ý¿â.Ϊʲô¶Á²»µ½Öµ?·µ»Ø¿Õ¼Ç¼¼¯.
ÎÒÖ±½ÓÔËÐÐselect rootchannel from model_content group by rootchannel order by sum(hits) descʱËüµ¯³öÒ»¸ö´°¿Ú.ÌáʾÎÒÊäÈë²ÎÊýrootchannel
ÊäÈëÁËrootchannel¾ÍÄܲé³öÀ´.²»ÊäÈë¾Í²»Äܲéѯ.
rootchannelÊǸù²Ëµ¥µÄID.
ACCESS °ï¶¥..
select name,channelid
from model_channel
where channelid
in (select rootchannel from model_content group by rootchannel)
-- order by sum(hits) desc)
and rootchannel=81
×Ó¾äÀïÃæÒªÓÃORDER BY µÄ,Ò»°ãÒª¼ÓTOP N·ñÔòÓ¦¸Ã»á±¨´íµÄ
access µÄ½¨Òéת°æ,°ï¶¥.
sql="select a.name,a.channelid
from model_channel a, model_content b
where a.channelid =b.rootchannel and a.rootchannel=81"
select name,channelid
from model_channel
where channelid in
(select rootchannel from model_content group by rootchannel order by sum(hits) desc)
and rootchannel=81
Ïë²»³öÄãÕâÀïµÄÅÅÐòÓÐʲôÒâÒå
¶÷.×Ô¼º½â¾öÁË.д´íÁËÒ»¸ö×Ö¶Î.µ¼Ö³ö´í..лл¸÷λ..
Ïà¹ØÎÊ´ð£º
Ö´ÐеÄ˳Ðò£º
1£©Îļþä¯ÀÀ¿ò£¨Ñ¡ÔñÎļþʹÓã©
Ñ¡ÔñºÃÎļþºó
µã»÷Ò»¸öµ¼Èë°´Å¥µÄʱºò £¬°ÑÉÏÃæÉÏ´«¿òÀïµÄcsvÎļþÒÔÒ»¸öIDΪÎļþÃû£¬ÉÏ´«µ½**/**Îļþ¼ÐÏÂ
2£©¶ÁÈ¡Õâ¸öÎļþ¼ÐϵÄcsvµÄÎļþ£¬×ª»»³Ésql
3 ......
type Exception report
message
description The server encountered an internal error () that prevented it from fulfilling this request.
exception
org.apache.jas ......
select count(1) from FX_RETURNBOOKCHECKLIST fxreturnbo0_ where fxreturnbo0_.BOOKID='164 ' AND fxreturnbo0_.RETURNID='00025.S0000001'
ÉÏÃæÒ»¸ö¼òµ¥µÄSQL,Ö´ÐÐʱ¼ä2.6à ......
×Ö¶Î1,×Ö¶Î2.....×Ö¶ÎN,Status,ParentID
1,Name1....test1,1,99
1,Name1....test1,3,99
1,Name2....test2,1,101
1,Name2....test2,3,101
1,Name3....test3,2,101
1,Name1....test1,4,101
ÏëÒªµÄ½á¹ûÊÇ:
1,Na ......
id url rank ......