Interview Guides

You are given a transaction table from an Infosys Finacle-style payments dataset. Write a PostgreSQL query to return the second-highest distinct transaction amount without using the LIMIT clause. If the highest amount appears multiple times, it should still count as one distinct value, so the query must return the next lower distinct amount.