Open
Conversation
ac9831
approved these changes
Feb 3, 2026
| email VARCHAR(200) UNIQUE NOT NULL, | ||
| nickname VARCHAR(20) UNIQUE NOT NULL, | ||
| password VARCHAR(50) NOT NULL, | ||
| created_id TIMESTAMP DEFAULT NOW(), |
| nickname VARCHAR(20) UNIQUE NOT NULL, | ||
| password VARCHAR(50) NOT NULL, | ||
| created_id TIMESTAMP DEFAULT NOW(), | ||
| update_id TIMESTAMP DEFAULT NOW() |
Collaborator
There was a problem hiding this comment.
이것도 id가 아니라 at으로 바꿔야 할 것 같아요
| price, | ||
| created_at, | ||
| updated_at, | ||
| (SELECT COUNT(id) FROM user_favorite_products |
Collaborator
There was a problem hiding this comment.
user_favorite_products 테이블은 존재하지 않는거 같은데 어떤 테이블일까요?
| (SELECT COUNT(id) FROM user_favorite_products | ||
| WHERE product_id = products.id) as favorite_count | ||
| FROM products | ||
| WHERE owner_id = 1 |
| */ | ||
| SELECT COUNT(id) as total_count | ||
| FROM products | ||
| WHERE owner_id = 1; |
| ORDER BY created_at DESC | ||
| LIMIT 10 | ||
| OFFSET 20; | ||
|
|
Collaborator
There was a problem hiding this comment.
user_favorite_products 테이블을 다른 이름으로 바꿔야 할 것 같아요
| 6. 상품 생성 | ||
| - 현재 로그인한 유저 id가 1이라고 가정 | ||
| */ | ||
| INSERT INTO products ( name, description, price, owner_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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
요구사항
기본
심화
주요 변경사항
스크린샷
멘토에게