CPSC 304 2004 MIDTERM 2 SOLUTIONS

Considertheinstance recipientname

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: t recipientName fro m donatio ns where amount < 500) vs select dist inct recipientName from donat ions No. Consider the instance: recipientName Amount … John 100 Campbell 2000 Mary null Top query returns John and Campbell, whereas bottom query returns all 3 names. c) select dist inct recipientName from donat ions A, donations B where A.amount ≥ 1000 and A.recipientName = B.recipientName and A.donorOrganization ≠ B.donorOrganizat ion vs select dist inct recipientName from donat ions where amount ≥ 1000 group by recipientName having count(donorOrganizat ion) ≥ 2 (2 points) No. Consider the instance: recipientName donorOrganization Amount … Campell CUPE 100 Campbell Canucks 2000 Top query returns Campbell, whereas bottom query returns nothin...
View Full Document

Ask a homework question - tutors are online