Advertisement
Guest User

Untitled

a guest
Mar 21st, 2018
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.28 KB | None | 0 0
  1. create or remplace function getMoyQuantiteClient(un_ncli clients ncli%type)
  2. returns decimal(10.2) As
  3. $$
  4. declare
  5. moy decimal(10.2);
  6. Begin
  7. Select AVG(qa) into moy from achat
  8. where ncli = un_ncli;
  9. return moy;
  10. end
  11. $$ language plpgsql;
  12. -- select getMoyQuantiteClient(101);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement