I am trying to select values from two tables and insert them into one table and calculate the number of placements in total per year. I keep getting an error saying sequence
Do it like this You can use the sequence like this, For the group by part i recommend you follow the other answer from @Tony INSERT INTO placement_cal ( cal_id.nextval , EXTRACT(YEAR FROM start_date) , count(placement_id) FROM placement group by year);
INSERT INTO placement_cal (
cal_id.nextval , EXTRACT(YEAR FROM start_date) , count(placement_id)
FROM placement_two
group by year);