Çë½Ì£ºSQLÓï¾ä
ÓÐÈçϼ¸Ìõ¼Ç¼£¬¼Ç¼ͬһ¸öÉÌÆ·Óɲ»Í¬¹©Ó¦ÉÌÔÚ²»Í¬Ê±ÆÚµÄ½ø»õ¼Û¸ñ,DATE×ֶδú±íµÄÊǽø»õ¼Û¸ñÆðʼÈÕ£º table½á¹¹ÈçÏ£º date price vendor 20100101 10.00 A 20100321 12.00 A 20100425 9.00 A 20100209 10.00 B ½ñÌìÊÇ4ÔÂ2ÈÕ£¬ÎÒÈçºÎÄÜÈ¡µ½Ä¿Ç°¸÷¸ö¹©Ó¦É̵Ľø»õ¼Û¸ñÄØ? 20100209 10.00 B 20100321 12.00 A лл¸÷λÀ²~~
select * from table a,(select max(date),vendor group by vendor) b where a.date=b.date and a.vendor=b.vendor select * from table a where not exists (select 1 from table b where a.v=b.v and a.d<b.d) Â¥ÉϵÄÃ²ËÆ¶¼¿ÉÒÔ··ÒýÓà ¥ÉϵÄÃ²ËÆ¶¼¿ÉÒÔ·· Ҳллcodearts¡£½áÌùʱ·ÖÒѾËÍÍêÁË~~~~
Ïà¹ØÎÊ´ð£º
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à ......
tab1 ×Ö¶Î:billdate,goodsid,incount,inmoney,outcount,outmoney,endprice,endcount,endamt tab2 ×Ö¶Î:goodsid,goodskind£¨ÉÌÆ·ÀàÐÍ£© tab3 ×Ö¶Î:goodskind£¨ÉÌÆ·ÀàÐÍ£©,kindname ½á¹û£º µÃµ½ÉÌÆ·ÀàÐÍÔÚÒ»¶Îʱ¼ä ......
×Ö¶Î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 ......
µÚÒ»¾ä: select ht.gfdm,gfdm.gfmc,gfdm.lb ,sum(jh.htdj*jh.htsl)as je from ht left join gfdm on ht.gfdm=gfdm.gfdm join jh on ht.htbh=jh.hth and ht.htbh not like'del%' and ht. ......