Created
September 23, 2022 08:56
-
-
Save e-jigsaw/c9aa32f47f8fb35a5cead37283272f5c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
create function latest_articles(offset_arg int, limit_arg int) returns table(id text, title text, created timestamp, image text) as $$ | |
select pages.id, pages.title, pages.created, pages.image | |
from pages, articles | |
where articles.page_id = pages.id | |
order by pages.created desc | |
offset offset_arg | |
limit limit_arg; | |
$$ stable language sql; |
Author
e-jigsaw
commented
Sep 23, 2022
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment