• 카테고리

    질문 & 답변
  • 세부 분야

    데이터 분석

  • 해결 여부

    미해결

똑같이 작성했는데 오류가 발생합니다 ㅠ

22.09.20 16:23 작성 조회수 154

0

with counter as (

select hackers.hacker_id

, hackers.name

, count(*) as challenges_created

from Challenges

inner join Hackers on Challenges.hacker_id = Hackers.hacker_id

group by hackers.hacker_id, hackers.name)

계속 아래와 같은 오류가 발생합니다 ㅠㅠㅠ

  •  

    Msg 102, Level 15, State 1, Server dbrank-tsql, Line 8
  • Incorrect syntax near ')'

 

란 오류가 자꾸 발생합니다 ㅠㅠ

 

답변 1

답변을 작성해보세요.

0

oort_cloud98님의 프로필

oort_cloud98

2022.09.20

참고 : Stack Overflow - https://stackoverflow.com/questions/45376755/with-clause-incorrect-syntax-near-sql-server-2016

간단히 말해 불완전한 구문이라 에러가 발생한다고 설명하고 있습니다.
with ~ as ~ 문은
마지막에 SELECT 해줘야 된다고 합니다.
작성자님이 작성하신
with counter as (~~~) select * from counter 해줘야 하는것 같습니다.
잘 동작했으면 좋겠네요!