Home » SQL & PL/SQL » SQL & PL/SQL » Complex SQL Quiries for me (11g,12c)
icon4.gif  Complex SQL Quiries for me [message #672355] Fri, 12 October 2018 03:53 Go to next message
graphe
Messages: 23
Registered: October 2014
Junior Member

Table T1
C1. C2. Distance
HYD. BANG 600
HYD MUM. 700
HYD CHN. 800
HYD BANG 600
BANG HYD. 600


Desired Output
C1. C2. Distance
HYD. BANG 600
HYD. MUM. 700
HYD. CHN. 800

Q1.Please write Query for the above Expected result?

And as well

T1 Table
C1 Column
A
A
A
B
B
T2 Table
C2 Column
A
A
B

Desired Output
C1. C2
A. A
A. A
A. Null
B. B
B. Null

Q2. Write query for the above ?
Re: Complex SQL Quiries for me [message #672363 is a reply to message #672355] Fri, 12 October 2018 05:55 Go to previous messageGo to next message
pablolee
Messages: 2876
Registered: May 2007
Location: Scotland
Senior Member
This is clearly homework. Whilst (most/all) people on here will not do your homework for you, we WILL help you if you put the effort in.
First thing to do is provide create table and insert scripts to replicate the data that you are working on.
the second thing to do is to post the code that you have attempted so far.
Re: Complex SQL Quiries for me [message #672364 is a reply to message #672363] Fri, 12 October 2018 06:46 Go to previous messageGo to next message
BlackSwan
Messages: 26201
Registered: January 2009
Location: SoCal
Senior Member
Please read and follow the forum guidelines, to enable us to help you:
OraFAQ Forum Guide
How to use {code} tags and make your code easier to read
Re: Complex SQL Quiries for me [message #672369 is a reply to message #672355] Fri, 12 October 2018 10:09 Go to previous messageGo to next message
Michel Cadot
Messages: 65848
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator

From one of you previous topic:

Michel Cadot wrote on Fri, 27 November 2015 16:24

With any SQL or PL/SQL question, please, Post a working Test case: create table (including all constraints) and insert statements along with the result you want with these data then we will be able work with your table and data. Explain with words and sentences the rules that lead to this result.

Before, Please read OraFAQ Forum Guide and How to use [code] tags and make your code easier to read.
Make sure that lines of code do not exceed 80 characters when you format.
Indent the code, use code tags and align the columns in result.
Use the "Preview Message" or "Preview Quick Reply" button to verify.
Also always post your Oracle version, with 4 decimals.

If you don't know how to format your code, learn it using SQL Formatter.
And as you didn't feedback to the many people who spent time to help you in your latest topics and show really reluctant to give what we ask you, it will be hard to now find someone who would like to help you more.

Re: Complex SQL Quiries for me [message #672374 is a reply to message #672363] Fri, 12 October 2018 13:55 Go to previous messageGo to next message
graphe
Messages: 23
Registered: October 2014
Junior Member

I tried my best to get the query I could able to match some part of answer so I decided to take help that is why I am posted. Please respond on the query rather than me over posting the problem.
Re: Complex SQL Quiries for me [message #672376 is a reply to message #672374] Fri, 12 October 2018 14:07 Go to previous messageGo to next message
Michel Cadot
Messages: 65848
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator

Provide what is asked as it is asked.
Why should we spend time to help you if you don't want to spend time to help us to help you?

Re: Complex SQL Quiries for me [message #672379 is a reply to message #672374] Fri, 12 October 2018 16:18 Go to previous message
pablolee
Messages: 2876
Registered: May 2007
Location: Scotland
Senior Member
graphe wrote on Fri, 12 October 2018 19:55
I tried my best to get the query I could able to match some part of answer so I decided to take help that is why I am posted. Please respond on the query rather than me over posting the problem.
Can you explain why you completely ignored my post please? Did you not see it? Can you not be arsed providing the information requested? Do you think yourself above providing the information requested? Maybe someone will spoon feed you. Not me.
[Edit:} Just had a look through your posting history. Hahaha, no way am I getting involved in this one. I'm out

[Updated on: Fri, 12 October 2018 16:24]

Report message to a moderator

Previous Topic: Error in converting CLOB to BLOB
Next Topic: Calculate problem , help me
Goto Forum:
  


Current Time: Sat Oct 20 00:14:28 CDT 2018