I am always surprised at the added knowledge i can get from others when i give my opinion on a topic.
I am always surprised at the added knowledge i can get from others when i give my opinion on a topic.
Paul Ngom wrote:Thanks Roel, The solution works perfectly.
But much more important: do you understand why this solution works and why you need 2 (inner) joins to get the desired result?
I am always surprised at the added knowledge i can get from others when i give my opinion on a topic.
Paul Ngom wrote:Can you give the explanation, please?
I am always surprised at the added knowledge i can get from others when i give my opinion on a topic.
Paul Ngom wrote:I have dealt with single inner join but i did not know i could have multiple ones with a select.
I am always surprised at the added knowledge i can get from others when i give my opinion on a topic.
Paul Ngom wrote:select name as source_name,cost from country,costs where country.code=costs.source and cost=40;
I am always surprised at the added knowledge i can get from others when i give my opinion on a topic.
Paul Ngom wrote:Probably i will have 'United states of America' printed under destination_name.
I am always surprised at the added knowledge i can get from others when i give my opinion on a topic.
Paul Ngom wrote:I may not have understood you question well but if those are the only available 2 table then the query to produce the result you have given could be:
I am always surprised at the added knowledge i can get from others when i give my opinion on a topic.
Paul Ngom wrote:No, I cannot. Any hint? :-)
I am always surprised at the added knowledge i can get from others when i give my opinion on a topic.
Paul Ngom wrote:Then what do i do next if i am correct?
I am always surprised at the added knowledge i can get from others when i give my opinion on a topic.
Paul Ngom wrote:select cs.name as source_name,cd.name as destination_name, c.cost from country_source cs,costs c,country_destination cd where cs.code=c.source and cd.code=c.destination and c.cost=40;
Am i right, Roel?
I am always surprised at the added knowledge i can get from others when i give my opinion on a topic.
Paul Ngom wrote:I think the final answer is:
select cs.name as source_name,cd.name as destination_name, c.cost from country cs,costs c,country cd where cs.code=c.source and cd.code=c.destination and c.cost=40;
Paul Ngom wrote:Thanks a lot Roel for the time you spend with me in teachimg me that. I do appreciate it.
Paul Ngom wrote:It is getting to midnight at my side and i am readying to leave you now.
She still doesn't approve of my superhero lifestyle. Or this shameless plug:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
|