You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If I press Run Query the query executes correctly and shows the expected results. But if I Save Query it produces an error.
Query
with users_by_month as (
select
id,
email,
date_part('year', created_at)::integeras"year",
date_part('month', created_at)::integeras"month"from users
)
select
to_char( make_date(year,month, 1), 'YYYY MONTH' ) as"Month",
count(*) as"User Signups"from users_by_month
group by year, month
order by year, month
;
Error after saving
Database error 42601: syntax error at or near "year" QUERY: with users_by_month as ( select id, email, date_part('year', created_at)::integer as "year", date_part('month', created_at)::integer as "month" from users)select to_char( make_date(year,month, 1), 'YYYY MONTH' ) as "Month", count(*) as "User Signups"from users_by_monthgroup by year, monthorder by year, month;
OS: macOS 10.14.4
PostgreSQL: 9.6.8
If I press Run Query the query executes correctly and shows the expected results. But if I Save Query it produces an error.
Query
Error after saving
Database error 42601: syntax error at or near "year" QUERY: with users_by_month as ( select id, email, date_part('year', created_at)::integer as "year", date_part('month', created_at)::integer as "month" from users)select to_char( make_date(year,month, 1), 'YYYY MONTH' ) as "Month", count(*) as "User Signups"from users_by_monthgroup by year, monthorder by year, month;
The text was updated successfully, but these errors were encountered: