SQL Interview Questions – Find Customers With Positive Revenue this Year

Spread the love

Problem Description –

Write an SQL query to report the customers with postive revenue in the year 2021.

Return the result table in any order.

The query result format is in the following example.

Problem Link – Positive revenue

Difficulty Level – Easy

Solution –

SELECT
    customer_id
FROM Customers
WHERE year = 2021 AND revenue >= 1

Rating: 1 out of 5.

Leave a Reply