Home » SQL & PL/SQL » SQL & PL/SQL » Needed a query for the situation like (Oracle 10g (release 10.2))
Needed a query for the situation like [message #434515] Wed, 09 December 2009 08:39 Go to next message
cgmsuresh
Messages: 29
Registered: December 2007
Location: http://maps.google.com/ma...
Junior Member

Hi to all,

please give me a query for the given situation.

There are three tables are there.
1. Students (stud_id,stud_name,book_name,dept_id)
2. Library (book_id,dept_id)
3. Books (book_id,book_name)

above are the three tables with their column names.

I need a query
to get the number of students group by students.dept_id, when only the unique book_name of students table equals to the unique book name of library.book_id.

and also i need the query when it is not equal condition for above situation.

Please solve this issue and let me know the query for this issue.

Thanks and Regards,
Suresh
Re: Needed a query for the situation like [message #434518 is a reply to message #434515] Wed, 09 December 2009 08:44 Go to previous messageGo to next message
Michel Cadot
Messages: 64153
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
We don't do homework for you here, please use SQL*Plus and copy and paste what you already tried.

It also helps if you post a working Test case: create table and insert statements along with the result you want with these data.

Regards
Michel
Re: Needed a query for the situation like [message #434520 is a reply to message #434518] Wed, 09 December 2009 08:49 Go to previous message
cgmsuresh
Messages: 29
Registered: December 2007
Location: http://maps.google.com/ma...
Junior Member

Thanks Michel for your reply
Previous Topic: Oracle Architecture
Next Topic: UPDATE question => updating with information from other table
Goto Forum:
  


Current Time: Sun Dec 11 04:25:24 CST 2016

Total time taken to generate the page: 0.08990 seconds