MySQL Forums
Forum List  »  Newbie

Re: Why use JOINS when have FK
Posted by: Andy Deans
Date: March 25, 2010 09:20AM

Thanks Chad, I will give it a go.

Your the man.

I have one more query if you would be so kind to help.

Someone on another forum helped me produce a query to total up the amount due in. This is what i have:

select sum(sub_amt) total_due from ( SELECT sum(amount) sub_amt
FROM protection
WHERE datepaid is null ) a

This works however i am not sure how to show the ProviderName colum and also link to users table to show the user who is due in the total amount.

it would be 2 seperate queries.

1 for just the providername and the other for to show providername in the result but also what user has that amount due?

Hope you can help, i appreciate it.

Also is that query ok i was given? i am not sure how to join in it, i tried adding in JOIN providername but did not work.

Thank you again

Options: ReplyQuote


Subject
Written By
Posted
March 23, 2010 05:11AM
Re: Why use JOINS when have FK
March 25, 2010 09:20AM


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.