Welcome Back

Google icon Sign in with Google
OR
I agree to abide by Pharmadaily Terms of Service and its Privacy Policy

Create Account

Google icon Sign up with Google
OR
By signing up, you agree to our Terms of Service and Privacy Policy
Instagram
youtube
Facebook

Count the Number of Discontinued Products

Count the Number of Discontinued Products
Product Table:


Query Explanation:

  • COUNT(*): Counts the number of rows where the condition is true.

  • WHERE Discontinued = 1: Filters only those products that are marked as discontinued.

  • AS DiscontinuedProductCount: Gives a clear alias to the output column.

SQL Query:

SELECT COUNT(*) AS DiscontinuedProductCount
FROM Products
WHERE Discontinued = 1;

Output: