Suppose you are given the following table, containing information around total tonnage of trash for various landfills across various states. In other words, each row represents the total weight (in tons) of trash at a specific landfill site in a specific state.
Using the above table, write a SQL query to return the landfill with the second highest amount of garbage (based on weight) for each state shown. You can assume each row represents a unique landfill (e.g. the weights shown are the total weights, and do not need further aggregation) and each weight happens to be unique (e.g. there are no ties).
Subscribe to premium account to see the solution.Get premium now