2 Votes Vote

write efficient mysql statement how represent in a different table form

Posted by topdog 541 days ago Questions| table mysql write All

Hi guys,

I've a question, I've a table

|origin   |destination |flight_type |price|
|melbourne|sydney      |one way     |100  |
|melbourne|sydney      |return trip |250  |

how do i write a single mysql query to get a table result like below:

|origin    |destination  |oneway_price |return_price|
|melbourne |sydney       |100          |250         |
|

Originally asked by: flyclassic on Stack Overflow

Discuss Bury


Who Voted for this Question