Loading...
Stock Status
A easy SQL interview practice problem on DataDriven. Write and execute real sql code with instant grading.
- Domain
- SQL
- Difficulty
- easy
Problem
The storefront team is redesigning product tiles and wants a clean availability label on each one. For every product, output the product name, category, price, and a label that reads 'In Stock' when the item is available and 'Out of Stock' otherwise. Only include products that have a price on file, ordered alphabetically by product name.
Practice This Problem
Solve this SQL problem with real code execution. DataDriven runs your SQL queries against a live PostgreSQL database and grades it instantly.