Chapter Ring Dust - issue with sql
robertlyson opened this issue · comments
Robert commented
On page 192 in "refactor part1: a better cte" subchapter materialized view flyby_altitudes
is created
It doesn't work .. but it's fine, here is the fixed version:
drop materialized view if exists flyby_altitudes;
create materialized view flyby_altitudes as
select
(sclk::timestamp) as time_stamp,
date_part(‘year’, (sclk::timestamp)) as year,
date_part(‘week’, (sclk::timestamp)) as week,
alt_t::numeric(10,3) as altitude
from import.inms
where target=’ENCELADUS’ and alt_t IS NOT NULL;
Hope that helps!
PS: this book is ...
Robert commented
Ah, now I understand
Sorry, little journal, the formatting for this SQL isn’t the best.
:)