source destination distance
chennai bangalore 500
bangalore chennai 500
hyd delhi 1000
delhi hyd 1000
bangalore hyd 800
Here chennai to bangalore and bangalore to chennai is same distance. and hyd and delhi also same criteria.
Based on the distance i want to display only one row using sql query?
Answer Posted / ajitnayak
select distinct source,destination,distance from dist_tab where source > destination
minus
select distinct source,destination,distance from dist_tab where source < destination
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
How to create your own reports in sql developer?
what are the different tables present in mysql? : Sql dba
How many tables can you join in sql?
How do you run a query?
What is spool?
What are the two types of periodical indexes?
Why do you partition data?
Is big data nosql?
What are the two virtual tables available at the time of database trigger execution?
What normalization means?
What is the life of an sql statement?
What are two statement types in sql?
Write a program that shows the usage of while loop to calculate the average of user entered numbers and entry of more numbers are stopped by entering number 0?
What is normalisation and its types?
What is a parameter query?