Is there a way to find max values of three column in mysql

Issue

This Content is from Stack Overflow. Question asked by simsar

I have been working on a project which analyze credit rate from different bank.
I have a simple table structured like below

`id` varchar(255) DEFAULT NULL,
`credit_name` varchar(255) DEFAULT NULL,
`credit_name2` varchar(255) DEFAULT NULL,
`rate_home` float DEFAULT NULL,
`rate_vehicle` float NOT NULL,
`rate_need` float NOT NULL,
`bankname` float NOT NULL, 

Example input below:
| id | credit_name |credit_name2|rate_home|rate_vehicle|rate_need|bankname|
| —| ———– |———— |———|————|———|——–|
| 1 | Take Me |Take Me 2 |10 | 5 | 15 | Bank A
| 2 | Pick Me |Pick Me 2 |15 | 20 | 8 | Bank B|
| 3 | Choo Me |Choo Me 2 |20 | 25 | 45 | Bank C|
| 4 | Gett Me |Gett Me 2 |35 | 12 | 4 | Bank D|

Example output:

rate_homerate_vehiclerate_need
35 from bank d25 from bank c45 from bank c

The output may be a wrong structure bu forgive my lack of experience.

I use BS4 TO fetch data , MYSQL to store the data and PYTHON to process data



Solution

This question is not yet answered, be the first one who answer using the comment. Later the confirmed answer will be published as the solution.

This Question and Answer are collected from stackoverflow and tested by JTuto community, is licensed under the terms of CC BY-SA 2.5. - CC BY-SA 3.0. - CC BY-SA 4.0.

people found this article helpful. What about you?