Write a query to display the second maximum payable amount who paid by the owner .Give an alias name to the second maximum payable amount as ‘second_max_payable_amount‘.
Solution
SELECT MAX( payable_amount ) as second_max_payable_amount
FROM bill
WHERE payable_amount < ( SELECT MAX( payable_amount )
FROM bill )
Output:
SECOND_MAX_PAYABLE_AMOUNT 724500
Happy Learning – If you require any further information, feel free to contact me.