Query editor
SELECTbuyer_link AS "Owner",MAX(transfer_date) AS "Last bought",COUNT(*) AS "# Player IDs",COUNT(*) FILTER (WHERE latest_status = 'Active') AS "# Active",COUNT(*) FILTER (WHERE latest_status = 'Jury') AS "# Jury",ARRAY_AGG(playerId ORDER BY playerId) FILTER (WHERE latest_status = 'Active') AS "Active Player IDs",ARRAY_AGG(username ORDER BY playerId) FILTER (WHERE latest_status = 'Active') AS "Active usernames",ARRAY_AGG(playerId ORDER BY playerId) FILTER (WHERE latest_status = 'Jury') AS "Jury Player IDs",ARRAY_AGG(username ORDER BY playerId) FILTER (WHERE latest_status = 'Jury') AS "Jury usernames"FROM query_3618778 --all transfersWHERE current_owner = TRUEGROUP BY 1ORDER BY count(*) DESC