ÉèΪÊ×Ò³ ¼ÓÈëÊÕ²Ø

TOP

Ò»µÀoracleÃæÊÔÌâ
2014-11-24 01:01:21 ¡¾´ó ÖРС¡¿ ä¯ÀÀ:6627´Î
Tags£ºÒ»µÀ oracle ÊÔÌâ

¿Í»§±ía(id name address) µÇ½Á÷Ë®±íb(id time) ¹ºÎïÁ÷Ë®±íc(id time productid productnum)
1.Çóÿ¸ö¿Í»§µÄ×îеǽʱ¼ätimeÐÕÃûname¿Í»§id
2.²é×îеǽ²¢ÇÒÒѾ­¹ºÂòÉÌÆ·µÄ¿Í»§idnameµÇ½µÄʱ¼ätime(Ò»ÌõsqlÓï¾ä)


Ò»¸ö±ístudentÖÐÓа༶classidѧºÅid³É¼¨grade
1.¼ÆËã¸÷¸ö°àµÄƽ¾ù³É¼¨
2.²éÕұȸðàƽ¾ù³É¼¨¸ßµÄѧÉúµÄ°à¼¶classidѧºÅid³É¼¨grade

1.Çóÿ¸ö¿Í»§µÄ×îеǽʱ¼ätimeÐÕÃûname¿Í»§id
select a.ida.named.time as time
from a left join (select idmax(time) as time from b group by id) d
on a.id =d.id ;
2.²é×îеǽ²¢ÇÒÒѾ­¹ºÂòÉÌÆ·µÄ¿Í»§idnameµÇ½µÄʱ¼ätime(Ò»ÌõsqlÓï¾ä)
select a.ida.named.time as time
from a(select idmax(time) as time from b group by id) d
where a.id =d.id
and exists (select * from c where id = a.id);
1.¼ÆËã¸÷¸ö°àµÄƽ¾ù³É¼¨
select classidavg(grade)
from student
group by classid;
2.²éÕұȸðàƽ¾ù³É¼¨¸ßµÄѧÉúµÄ°à¼¶classidѧºÅid³É¼¨grade
select a.classida.ida.grade
from student a
where a.grade >(select avg(grade) from student where classid = a.classid);


¡¾´ó ÖРС¡¿¡¾´òÓ¡¡¿ ¡¾·±Ìå¡¿¡¾Í¶¸å¡¿¡¾Êղء¿ ¡¾ÍƼö¡¿¡¾¾Ù±¨¡¿¡¾ÆÀÂÛ¡¿ ¡¾¹Ø±Õ¡¿ ¡¾·µ»Ø¶¥²¿¡¿
ÉÏһƪ£ºÊÔÊÔÒ»¸öËã·¨ÍÆÀíÃæÊÔÌâ ÏÂһƪ£º¡°What does the ThreadStatic at..

×îÐÂÎÄÕÂ

ÈÈÃÅÎÄÕÂ

Hot ÎÄÕÂ

Python

C ÓïÑÔ

C++»ù´¡

´óÊý¾Ý»ù´¡

linux±à³Ì»ù´¡

C/C++ÃæÊÔÌâÄ¿