Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | ||||
4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 | 12 | 13 | 14 | 15 | 16 | 17 |
18 | 19 | 20 | 21 | 22 | 23 | 24 |
25 | 26 | 27 | 28 | 29 | 30 | 31 |
Tags
- geometry
- SQL
- 자바
- two pointers
- Matrix
- Binary Search
- string
- sorting
- implement
- simulation
- hash table
- java
- Counting
- Math
- 코딩테스트
- Method
- Tree
- Data Structure
- Binary Tree
- Class
- Stack
- 구현
- Number Theory
- array
- 파이썬
- dynamic programming
- 코테
- greedy
- database
- bit manipulation
Archives
- Today
- Total
코린이의 소소한 공부노트
[LeetCode/Easy] 1587. Bank Account Summary II 본문
1. Input
1) Table: Users (pk: account)
2) Table: Transactions (pk: trans_id)
2. Output
1) 모든 거래가 끝난 후 계좌 잔액이 만원 초과인 사람의 이름과 잔액을 출력
- 모든 계좌는 0원부터 시작한다.
- 출력 순서는 상관없다.
3. Example
4. Code
1) 첫 코드(2023/03/29)
select name, balance
from Users u, (
select account, sum(amount) as balance
from Transactions
group by account
) t
where u.account=t.account and balance>10000;
'코딩테스트 풀이 > SQL' 카테고리의 다른 글
[LeetCode/Easy] 1075. Project Employees I (0) | 2023.04.04 |
---|---|
[LeetCode/Easy] 1729. Find Followers Count (0) | 2023.03.29 |
[LeetCode/Easy] 1527. Patients With a Condition (0) | 2023.03.19 |
[LeetCode/Easy] 1407. Top Travellers (0) | 2023.03.19 |
[LeetCode/Easy] 620. Not Boring Movies (0) | 2023.03.17 |