Skip to content
Advertisement

Mysql query for comparing price one to each other based on type

example table

My query in laravel

The Results that i want is :

I was tried using left join but return the same price_a and price_b for all record.

Advertisement

Answer

You can try using case when expression

User contributions licensed under: CC BY-SA
3 People found this is helpful
Advertisement