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
When populating a cummulative table one year at a time, you can do it in a for-loop instead of changing the last year and this year by hand. Just a small suggestion to use this in the course.
DO $$
DECLARE
start_year INT;
end_year INT;
this_year INT;
BEGINSELECTMIN(year), MAX(year)
INTO start_year, end_year
FROM actor_films;
FOR this_year IN start_year..end_year LOOP
RAISE NOTICE 'Processing year: %', this_year;
INSERT INTO actors
-- >>>>> Your cummulative table generation query using the variable 'this_year' goes here <<<<<
END LOOP;
END $$;
The text was updated successfully, but these errors were encountered:
There is code present in first-week folder under /sql which can populate multiple years of data in one run.
bootcamp/materials/1-dimensional-data-modeling/sql/load_players_table_day2.sql
When populating a cummulative table one year at a time, you can do it in a for-loop instead of changing the last year and this year by hand. Just a small suggestion to use this in the course.
The text was updated successfully, but these errors were encountered: