Finding Minimum and Maximum Values with SQL
📖 Scenario: You are working with a small store's sales database. The store wants to find out the lowest and highest prices of products they sell to help with pricing decisions.
🎯 Goal: Build SQL queries that use the MIN and MAX functions to find the lowest and highest product prices from the products table.
📋 What You'll Learn
Create a
products table with columns product_id, product_name, and price.Insert exactly three products with specified prices.
Write a query to find the minimum price using the
MIN function.Write a query to find the maximum price using the
MAX function.💡 Why This Matters
🌍 Real World
Stores and businesses often need to find the lowest and highest prices of products to set discounts or price ranges.
💼 Career
Knowing how to use MIN and MAX functions is essential for data analysis and reporting roles that work with databases.
Progress0 / 4 steps