Oracle Query Exercise 24-28

Source: Internet
Author: User

24. The name of the teacher who has more than 5 students who have enrolled in a course

Select  from  where  t.tno= and C.cno=and  =(  Selectfromgroupby hasCount(CNO)> 5  Group by T.tname

25. Check the records of all students in class 95033 and 95031.

Select St.sno,st.sname,st.ssex,st.sbirthday,st.class,s.cno,s.degree,c.cname,c.tno,t.tname  from  where st.sno= and C.cno= and C.tno=T.tno

26, the inquiry existence has 85 points above the course CNO.

Select distinct  from where >  -

27. Find out the results table of the "computer Department" teacher teaching course.

Select  from where t.tno= and C.cno=s.cnoand  t.depart=  ' Computer Department '

28. Query the Tname and prof of teachers with different titles of "computer department" and "Electronic Engineering department"

Select  from  wherenot in (theselectfromwhere a.depart!=  and A.prof=b.prof) and in (' computer system  ',' Electrical Engineering Department ')

Oracle Query Practice 24-28

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.