강의

멘토링

커뮤니티

Inflearn Community Q&A

toyou4203's profile image
toyou4203

asked

SQL data analysis learned through various cases

Calculating and visualizing stickiness using SQL

:current_date를 설정하는 과정에서의 에러메시지

Written on

·

1.6K

0

select :current_date as curr_date, count(distinct user_id) as dau

from ga.ga_sess

where visit_stime >= (:current_date - interval '1 days') and visit_stime < :current_date;

를 구하는 과정에서 아래와 같이 에러메시지가 나오는데, 어떻게 해야해야 하나요?

 

:current_date 설정하는 과정에서,

확인을 누르면

에러 메시지:

SQL Error [22008]: 오류: 날짜/시간 필드의 값이 범위를 벗어남: "20161101"

무시를 누르면

에러 메시지:

SQL Error [42601]: 오류: 구문 오류, ":" 부근

Position: 7

DBMS/RDBMSsqlpostgresql데이터 엔지니어링퍼포먼스 마케팅

Answer 2

0

toyou4203님의 프로필 이미지
toyou4203
Questioner

감사합니다! 해결됬습니다!

0

dooleyz3525님의 프로필 이미지
dooleyz3525
Instructor

안녕하십니까,

to_date('20161101', 'yyyymmdd') 와 같이 넣어주시면 됩니다.

감사합니다.

toyou4203's profile image
toyou4203

asked

Ask a question