-
Notifications
You must be signed in to change notification settings - Fork 0
[민주] 유형1: INNER JOIN #4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| -- sale_id에 해당하는 제품 이름, 판매 연도, 판매 가격 조회 | ||
| SELECT s.sale_id, p.product_name, s.year, s.price | ||
| FROM sales s | ||
| INNER JOIN product p | ||
| ON s.product_id = p.product_id |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| -- 2025년 2월에 100개 이상 주문한 제품명과 수량 조회 | ||
| SELECT p.product_name, SUM(o.unit) AS unit | ||
| FROM products p | ||
| INNER JOIN orders o | ||
| ON p.product_id = o.product_id | ||
| WHERE YEAR(o.order_date) = 2025 | ||
| AND MONTH(o.order_date) = 2 | ||
| GROUP BY p.product_id, p.product_name | ||
| HAVING SUM(o.unit) >= 100 | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| -- 매니저보다 급여가 높은 직원 이름 조회 | ||
| SELECT e.name | ||
| FROM employee e | ||
| INNER JOIN employee m | ||
| ON e.manager_id = m.emp_id | ||
| WHERE e.salary > m.salary |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
오 날짜를 이렇게도 비교할 수 있군요! 잘 봤습니다