Skip to content

[하동우] sprint7#127

Open
hadongwoo02 wants to merge 2 commits intocodeit-bootcamp-nodejs:mainfrom
hadongwoo02:hdw/sql
Open

[하동우] sprint7#127
hadongwoo02 wants to merge 2 commits intocodeit-bootcamp-nodejs:mainfrom
hadongwoo02:hdw/sql

Conversation

@hadongwoo02
Copy link
Collaborator

요구사항

기본

  • 기본 항목 1
  • 기본 항목 2

심화

  • 심화 항목 1
  • 심화 항목 2

주요 변경사항

스크린샷

image

멘토에게

  • 셀프 코드 리뷰를 통해 질문 이어가겠습니다.

@ac9831 ac9831 self-requested a review February 3, 2026 12:15
email VARCHAR(200) UNIQUE NOT NULL,
nickname VARCHAR(20) UNIQUE NOT NULL,
password VARCHAR(50) NOT NULL,
created_id TIMESTAMP DEFAULT NOW(),
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

created_id가 아닐거라고 생각이 들어요

nickname VARCHAR(20) UNIQUE NOT NULL,
password VARCHAR(50) NOT NULL,
created_id TIMESTAMP DEFAULT NOW(),
update_id TIMESTAMP DEFAULT NOW()
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

이것도 id가 아니라 at으로 바꿔야 할 것 같아요

price,
created_at,
updated_at,
(SELECT COUNT(id) FROM user_favorite_products
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

user_favorite_products 테이블은 존재하지 않는거 같은데 어떤 테이블일까요?

(SELECT COUNT(id) FROM user_favorite_products
WHERE product_id = products.id) as favorite_count
FROM products
WHERE owner_id = 1
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

owner_id라는 컬럼이 있나요?

*/
SELECT COUNT(id) as total_count
FROM products
WHERE owner_id = 1;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

owner_id가 아닌거 같아요

ORDER BY created_at DESC
LIMIT 10
OFFSET 20;

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

user_favorite_products 테이블을 다른 이름으로 바꿔야 할 것 같아요

6. 상품 생성
- 현재 로그인한 유저 id가 1이라고 가정
*/
INSERT INTO products ( name, description, price, owner_id)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

image가 not null로 알고 있어요

@codeit-bootcamp-nodejs codeit-bootcamp-nodejs locked and limited conversation to collaborators Feb 3, 2026
@codeit-bootcamp-nodejs codeit-bootcamp-nodejs unlocked this conversation Feb 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants