Skip to main content

Most Recent Transaction

MediumPremium

Given an e-commerce database with the schema shown below, write a query to fetch the product name and stock of the most recently purchased product

diagramsales by customer

Your query should return a result in the following format:

id | name | stock ----+---------+------- int | varchar | int