Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit fe4ce33

Browse files
add 1511
1 parent 162f78d commit fe4ce33

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

README.md

+1
Original file line numberDiff line numberDiff line change
@@ -1090,6 +1090,7 @@ _If you like this project, please leave me a star._ ★
10901090
|1543|[Fix Product Name Format](https://leetcode.com/problems/fix-product-name-format/)|[Solution](../master/database/_1543.sql) || Easy |
10911091
|1527|[Patients With a Condition](https://leetcode.com/problems/patients-with-a-condition/)|[Solution](../master/database/_1527.sql) || Easy |
10921092
|1517|[Find Users With Valid E-Mails](https://leetcode.com/problems/find-users-with-valid-e-mails/)|[Solution](../master/database/_1517.sql) || Easy |
1093+
|1511|[Customer Order Frequency](https://leetcode.com/problems/customer-order-frequency/)|[Solution](../master/database/_1511.sql) || Easy |
10931094
|1495|[Friendly Movies Streamed Last Month](https://leetcode.com/problems/friendly-movies-streamed-last-month/)|[Solution](../master/database/_1495.sql) || Easy |
10941095
|1484|[Group Sold Products By The Date](https://leetcode.com/problems/group-sold-products-by-the-date/)|[Solution](../master/database/_1484.sql) || Easy |
10951096
|1407|[Top Travellers](https://leetcode.com/problems/top-travellers/)|[Solution](../master/database/_1407.sql) || Easy |

database/_1511.sql

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
select customer_id, name from Customers
2+
join Orders using(customer_id)
3+
join Product using(product_id)
4+
group by customer_id
5+
having
6+
sum(if(left(order_date, 7) = '2020-06', quantity, 0) * price) >= 100
7+
and
8+
sum(if(left(order_date, 7) = '2020-07', quantity, 0) * price) >= 100;

0 commit comments

Comments
 (0)