db.l3.ai

Play

lessons

what-changed-in-19

editor

engine: not started

results

Run a query to see rows here.

check

PL/pgSQL

PL/pgSQL adds variables, loops and control flow to SQL. EXIT WHEN leaves a loop early.

task

Write s(n int): the sum 1..n, leaving the loop as soon as the total exceeds 1000.

hints