Home » SQL & PL/SQL » SQL & PL/SQL » join 4 tables
join 4 tables [message #289551] Mon, 24 December 2007 00:04 Go to next message
user71408
Messages: 585
Registered: November 2007
Location: NE
Senior Member

Hi Here I have written 4 queried depends on 4 tables. I am not able to join those 4 queries. Pls give me idea for that....


select comments from ship where order is null;

select toloc,fromloc,cdate from head ;

select count(comments) from ship where order is null group by
                comments;

select sum(qty) from detail group by item;

select avg(cost) from shipsl group by item;



I wrote these queries to retrieve data from 4 tables. so Now I am going to join these 5 queries.

pls give me clue for this

Tahnk u
Re: join 4 tables [message #289553 is a reply to message #289551] Mon, 24 December 2007 00:15 Go to previous messageGo to next message
Michel Cadot
Messages: 64109
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Join? What do you mean with "join"?

Regards
Michel
Re: join 4 tables [message #289565 is a reply to message #289553] Mon, 24 December 2007 01:19 Go to previous messageGo to next message
user71408
Messages: 585
Registered: November 2007
Location: NE
Senior Member

I want to join these queries using JOIN conditions....

Re: join 4 tables [message #289570 is a reply to message #289565] Mon, 24 December 2007 02:12 Go to previous messageGo to next message
Michel Cadot
Messages: 64109
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
And what are the join conditions?

Regards
Michel
Re: join 4 tables [message #289579 is a reply to message #289570] Mon, 24 December 2007 02:56 Go to previous messageGo to next message
user71408
Messages: 585
Registered: November 2007
Location: NE
Senior Member

There is Item is common column in SHIPS and DETAILS TABLES.

SHIPMENT common column in SHIP and SHIPS tables.

using these columns I want to join...
Re: join 4 tables [message #289580 is a reply to message #289579] Mon, 24 December 2007 02:58 Go to previous message
Michel Cadot
Messages: 64109
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Good! So do so. You already have all the needed information.
Where are you stuck?

Regards
Michel
Previous Topic: Total Count
Next Topic: insert query problem
Goto Forum:
  


Current Time: Mon Dec 05 10:39:18 CST 2016

Total time taken to generate the page: 0.15072 seconds