Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

ÇóSQLÓï¾ä - ÆäËûÊý¾Ý¿â¿ª·¢ / MySQL/Postgresql

»õÎï±í     goods(
                            g_id   int,
                            quality   int,
                            person_id   int
                          )
                ÆäÖÐperson_idÊÇperson±íµÄÖ÷¼ü£¬±íʾ»õÎïÓµÓÐÈË¡£
                ÐèÇó£º     ÇóÓµÓлõÎïÊýÁ¿×î¶àµÄÇ°10ÃûÈËÎï¡£
Ìù¼Ç¼¼°ÒªÇó½á¹û³öÀ´¿´¿´£¬TRY
SELECT person_id,SUM(quality) from TT GROUP BY person_id ORDER BY SUM(quality) DESC LIMIT 10

ÒýÓÃ
Ìù¼Ç¼¼°ÒªÇó½á¹û³öÀ´¿´¿´£¬TRY
SELECT person_id,SUM(quality) from TT GROUP BY person_id ORDER BY SUM(quality) DESC LIMIT 10


quality Ö»ÊǸöÖÊÁ¿´úºÅ£¬ÔÙÏëÏë¿´£º ÓµÓлõÎïÊýÁ¿×î¶àµÄÇ°10ÃûÈËÎï

Ìù¼Ç¼¼°ÒªÇó½á¹û³öÀ´¿´¿´


select person_id,count(g_id) num from goods group by person_id order by num desc limit 10

ûÓп´µ½ÄãµÄ¼Ç¼
SELECT person_id,count(*) from TT GROUP BY person_id ORDER BY count(*) DESC LIMIT 10

+---------+---------+-----------+-<


Ïà¹ØÎÊ´ð£º

Asp+sql serverÎÊÌâ - Web ¿ª·¢ / ASP

ÎÒÒ»¸öÏîÄ¿£¬Óиö²åÈë²Ù×÷£¬¾ßÌåÊÇÕâÑùµÄ£º
ÎÒÓнø»õÐÅÏ¢±í¡£ÔÚ³ö»õʱѡÔñÏàÓ¦µÄ½ø»õÐÅÏ¢£¬ÊäÈëÊýÁ¿£¬Ñ¡Ôñ²¿Ãź󣬵㱣´æ°´Å¥£¬ÓÉÓÚÍøÂçÑÓʱ£¬µãÒ»ÏÂûÓз´Ó³£¬ÓÚÊÇÓû§¾ÍÓÖµãһϣ¬µ¼ÖÂÒ»´Î²åÈëÁËÁ½Ìõ¼Ç¼:
Àý£º ......

Çë½ÌsqlÓï¾ä¡£ - Oracle / ¿ª·¢

ÎÒÓÐÒ»¸ö±í£¬½á¹¹ÊÇÕâÑù¡£
  ת³ö µ¥Î» תÈ뵥λ ±ÊÊý ½ð¶î
date(Ö÷) outid(Ö÷) inid(Ö÷) num amt
2009 1 2 1 500 Ϊ 1 µ¥Î» ÔÚ2009Ä ......

mysqlÁ¬½Ótomcat - Java / Web ¿ª·¢

ÎÒÒѾ­°´Õս̳ÌÉÏÅäÖÃtomcatµÄserver.xml
<Context path = "/POS" docBase = "POS" debug = "5" reloadable = "true" crossContext = "true" workDir = &quo ......

sql ÎÊÌâ - MS-SQL Server / »ù´¡Àà

ÐèÇóÈçÏ£º
ѧԺ academy£¨aid,aname£©
°à¼¶ class£¨cid,cname,aid£©
ѧÉú stu(sid,sname,aid,cid)
סËÞÇø region(rid,rname)
ËÞÉáÂ¥ build(bid,rid,bnote) bnoteÊÇ¡®ÄС¯/¡®Å®¡¯
ËÞÉá dorm(did,rid,bid£¬bedn ......

mysqlÍâ¼ü - ÆäËûÊý¾Ý¿â¿ª·¢ / MySQL/Postgresql

ÎÒÓõÄÊÇmysql6.0Ϊʲôһ´´½¨Á½¸ö±íÕâ¼äÓÃÍâ¼üÀ´Á¬½Óʱ¾Í˵´´½¨²»ÁË£ºcan"nt create table ...
ÄãµÄÓï¾äÊÇʲô£¿ÄãµÄ±íÊÇʲô´æ´¢ÒýÇ棿 Èç¹ûÊÇmyisam Ôò²»Ö§³ÖÍâ¼ü£¬ÄãÐèÒª°Ñ±í¸ÄΪinndb

貼³öSQL&# ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ