Skip to content

Commit 4fa6888

Browse files
add 2205
1 parent c7bcbc2 commit 4fa6888

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

database/_2205.sql

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
CREATE FUNCTION getUserIDs(startDate DATE, endDate DATE, minAmount INT) RETURNS INT
2+
BEGIN
3+
RETURN (
4+
-- # Write your MySQL query statement below.
5+
select count(distinct(user_id)) from Purchases where
6+
time_stamp between timestamp(startDate) and timestamp(endDate) and amount >= minAmount
7+
);
8+
END

paginated_contents/database/README.md

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
|------|----------------|-----------------------------------------------------------------------------------------------------------------------|---------------|---------------|-------------
33
| 3198 |[Find Cities in Each State](https://leetcode.com/problems/find-cities-in-each-state/)| [Solution](https://github.com/fishercoder1534/Leetcode/blob/master/database/_3198.sql) || Easy |
44
| 3172 |[Second Day Verification](https://leetcode.com/problems/second-day-verification/)| [Solution](https://github.com/fishercoder1534/Leetcode/blob/master/database/_3172.sql) || Easy |
5+
| 2205 |[The Number of Users That Are Eligible for Discount](https://leetcode.com/problems/the-number-of-users-that-are-eligible-for-discount/)| [Solution](https://github.com/fishercoder1534/Leetcode/blob/master/database/_2205.sql) || Easy |
56
| 1789 |[Primary Department for Each Employee](https://leetcode.com/problems/primary-department-for-each-employee/)| [Solution](https://github.com/fishercoder1534/Leetcode/blob/master/database/_1789.sql) || Easy |
67
| 1757 |[Recyclable and Low Fat Products](https://leetcode.com/problems/recyclable-and-low-fat-products/)| [Solution](https://github.com/fishercoder1534/Leetcode/blob/master/database/_1757.sql) || Easy |
78
| 1741 |[Find Total Time Spent by Each Employee](https://leetcode.com/problems/find-total-time-spent-by-each-employee/)| [Solution](https://github.com/fishercoder1534/Leetcode/blob/master/database/_1741.sql) || Easy |

0 commit comments

Comments
 (0)