Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- create or replace podwyzka() returns void as
- $$
- declare
- kosztyP table(idpudelka pudelka.idpudelka%type, koszt numeric(6,2));
- begin
- select into kosztyP idpudelka,sum(sztuk*koszt) as koszt from artykuly natural join czekoladki group by idpudelka;
- for row_r in kosztyP
- loop
- raise notice `%. %.`, row_r.idpudelka, row_r.koszt;
- end loop;
- end;
- $$
- language plpgsql;
Add Comment
Please, Sign In to add comment