w
Size: a a a
w
V
w
V
w
NT
w
🎃
w
🎃
ПЛ
w
lv
w
B
return DB::statement('😂
SELECT u.*,
JSON_ARRAYAGG(JSON_OBJECT('subType', s.type, 'subId', s.id, 'subsDate', m.createdAt)) AS subs
FROM users u
LEFT JOIN user_subscription_map m ON m.user_id = u.id
LEFT JOIN subscription_programs s ON s.id = m.subscription_program_id
left join user_group_map ugm ON ugm.user_id =u.id
where ugm.group_id = 2
GROUP BY u.id
');
B
AB
lv
lv