Skip to content

Commit

Permalink
Update report example
Browse files Browse the repository at this point in the history
  • Loading branch information
nassibnassar committed Sep 6, 2023
1 parent 5b2d135 commit e87da37
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions doc/User_Guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -205,15 +205,17 @@ CREATE FUNCTION local.lisa_count_loans(
end_date date DEFAULT '2050-01-01')
RETURNS TABLE(
item_id text,
loan_count integer) AS
$$
loan_count integer)
AS $$
SELECT item_id,
count(*) AS loan_count
FROM circulation_loans
WHERE start_date <= loan_date AND loan_date < end_date
GROUP BY item_id
$$
LANGUAGE SQL;
LANGUAGE SQL
STABLE
PARALLEL SAFE;
```

Now the function can be called with different arguments to generate
Expand Down

0 comments on commit e87da37

Please sign in to comment.