How do i solve the below code syntax error . . . where year = origin in (select x.origin from (with subquesry as (

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899603
Joined: Mon Aug 02, 2021 8:13 am

How do i solve the below code syntax error . . . where year = origin in (select x.origin from (with subquesry as (

Post by answerhappygod »

How do i solve the below code syntax error
<code>. . . where year = origin in (select x.origin from(with subquesry as ( select origin,year,count(*) as depdelay_countfrom ontime where depdelay > 15 group by year,origin order bydepdelay_count desc ) select origin,year,rank() over (partition byyear order by depdelay_count desc) as rank from subquesry) x wtgroup by origin order by origin;
with oy as (select origin, year,count(*) as numflights, sum( (depdelay >15)::int ) as depdelay_count, row_number() over (partition by yearorder by sum( (depdelay > 15)::int ) desc) as seqnum from ontimegroup by origin, year )select oy.* from oy where seqnum <= 10;</code>
Above is the error i am getting
thank you
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply