I got two tables on MYSQL, I wonder if there is any aggregate function on MYSQL as array_agg() FROM postgreSQL.
TABLE 1 properties Only have 8 records TABLE 2 record
I think you want group_concat():
group_concat()
SELECT p.id, GROUP_CONCAT(pcb.users_admin_id) as uids FROM properties p INNER JOIN prop_captured_by pcb ON p.id = pcb.property_id GROUP BY p.id;
This produces a comma-delimited string, but that is as close to an array that you get in MySQL.