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
select posts.id, | |
title, | |
(case when count(c) = 0 then cast('[]' as json) else array_to_json(array_agg(c.obj)) end) AS comments | |
from posts | |
left join (select post_id, json_build_object('id', id, 'message', message) as obj from comments) c on posts.id = c.post_id | |
group by posts.id | |
order by title |
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
/* http://meyerweb.com/eric/tools/css/reset/ | |
v2.0 | 20110126 | |
License: none (public domain) | |
*/ | |
html, | |
body, | |
div, | |
span, | |
applet, |
NewerOlder