MySQL Forums
Forum List  »  Newbie

Re: not registed for a course and who has paid the most registration
Posted by: Paul Smith
Date: July 28, 2015 08:06PM

For a)
I need to be able to obtain the name of any customer who has not registered for a course

select name from tblCustomer
where (select confirmed from tblcourses is 0 or null);


for b)
I need to be able to obtain the name and registration paid of the customer(s) who have paid the most registration

select tblcustomer.name, tblCourseRegistration.CRegistrationPaid from tblCustomer,tblCourseRegistration
where (select sum(CRegistrationPaid) from tblCourseRegistration)


thanks for your help

Options: ReplyQuote




Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.