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
Error: At function: AssumeColumnOrder, At function: Take, At function: Sort, At function: PgReplaceUnknown, At function: OrderedMap, At function: AsStruct
#9676
SELECT DATE_TRUNC('year', dt_tm) AS __timestamp,
athlete AS athlete,
count(DISTINCT athlete) AS"COUNT_DISTINCT(athlete)"FROM
(select edition,
edition_id,
country_noc,
sport,
event,
result_id,
athlete,
athlete_id,
pos,
medal,
isTeamSport,
year,
CASE
WHEN MOD(year, 4) =0 THEN False
ELSE True
END AS isWinter,
TO_DATE(year::text||'-01-01', 'YYYY-MM-DD') AS dt,
TO_TIMESTAMP(year::text||'-01-01 00:00:00', 'YYYY-MM-DD HH24:MI:SS') AS dt_tm
from
(select edition,
edition_id,
country_noc,
sport,
event,
result_id,
athlete,
athlete_id,
pos,
medal,
isTeamSport,
cast(LEFT(edition, 4) asint) as year
from Olimpic) as Olimpic) AS virtual_table
GROUP BY athlete,
DATE_TRUNC('year', dt_tm)
ORDER BY"COUNT_DISTINCT(athlete)"DESCLIMIT10000;
But receives the error
Status: GENERIC_ERROR
Issues:
<main>: Error: Type annotation, code: 1030
<main>:1:1: Error: At function: AssumeColumnOrder, At function: Take, At function: Sort, At function: PgReplaceUnknown, At function: OrderedMap, At function: AsStruct
<main>:1:8: Error: At function: PgResolvedCall
<main>:1:27: Error: At function: Member
<main>:1:27: Error: Member not found: _alias_virtual_table.dt_tm
The text was updated successfully, but these errors were encountered:
I'm making a query
But receives the error
The text was updated successfully, but these errors were encountered: