SQL Write a query to display the second minimum fine amount from bill

Write a query to display the second minimum fine amount from bill.Give an alias name to the second minimum fine amount as ‘second_min_fine_amount’. 

SQL Write a query to display the second minimum fine amount from bill

Solution

SELECT MIN( fine_amount ) as second_min_fine_amount
FROM bill
WHERE fine_amount > ( SELECT MIN( fine_amount )
                FROM bill );

Output:

SECOND_MIN_FINE_AMOUNT
		 472.5

Happy Learning – If you require any further information, feel free to contact me.

Share your love
Saurav Hathi

Saurav Hathi

I'm currently studying Bachelor of Computer Science at Lovely Professional University in Punjab.

📌 Nodejs and Android 😎
📌 Java

Articles: 444

Leave a Reply

Your email address will not be published. Required fields are marked *