ITM500 - LAB 4 SOLUTION.doc

2 Pages
299 Views
Unlock Document

Department
Information Technology Management
Course
ITM 500
Professor
Raymond Moss
Semester
Winter

Description
--Lab 4 --Use the GolfClub Database. --1 List the average barbill by member type. Sequence the output, highest to lowest average. select avg(Barbill) as "Average" , MemberType from Member group by MemberType order by avg(Barbill) desc --2 List the total barbill for each team but only show the teams where the total is less than $100 select sum(BarBill) as "Total" , Teamname from Member where teamname is not null group by Teamname having sum(BarBill) < 100 --3 List the details of all members that were entered in tournaments in 2006. Show each member only once select distinct m.* from Member M inner join Entry e on m.MemberId = e.MemberId where year = 2006 --4 List the member id and entry count for each member who has entered more than 2 tournaments in 2006 select MemberId, count(*) "Entry Count" from Entry where year = 2006 group by MemberId having count(*) > 2 --5 List the name of any team that has less than 5 players. select teamname from member where TeamName is not null group by TeamName having COUNT(*) < 5 --6 List the details for all members that have ever entered the Westcoast tournament. Show each member only once select distinct m.* from Member m inner join Entry e on e.MemberId = m.MemberId inner join Tournament t on e.TourId = t.TourId where TourName = 'Westcoast' --7. List the details for all teams an
More Less

Related notes for ITM 500

Log In


OR

Join OneClass

Access over 10 million pages of study
documents for 1.3 million courses.

Sign up

Join to view


OR

By registering, I agree to the Terms and Privacy Policies
Already have an account?
Just a few more details

So we can recommend you notes for your school.

Reset Password

Please enter below the email address you registered with and we will send you a link to reset your password.

Add your courses

Get notes from the top students in your class.


Submit