← Back to TIL

Order by statements in postgres aggregates

select 
	array_agg(id ORDER BY created_at) as recent_users
from users