select "connect_requires"."uuid" as "uuid", "connect_requires"."user_uuid" as "user_uuid", "connect_requires"."place_uuid" as "place_uuid", "connect_requires"."title" as "title", "connect_requires"."description" as "description", "connect_requires"."from_date" as "from_date", "connect_requires"."to_date" as "to_date", "connect_requires"."expired_date" as "expired_date", "connect_requires"."budget" as "budget", "connect_requires"."status" as "status", "connect_requires"."created_at" as "created_at", ( select count(1) from require_partner_hobbies where require_partner_hobbies.require_uuid = connect_requires.uuid and require_partner_hobbies.hobby_uuid in ('17b7d418-0796-47b9-88ed-ec97f6f23026') ) as hobby_count
from "connect_requires" inner join "users" on "users"."uuid" = "connect_requires"."user_uuid" inner join "places" on "places"."uuid" = "connect_requires"."place_uuid" inner join "regions" on "regions"."uuid" = "places"."region_uuid" inner join "countries" on "countries"."uuid" = "regions"."country_uuid" left join "mbti_matches" on "mbti_matches"."first_mbti" = "users"."mbti"
where "connect_requires"."user_uuid" != '688a1049-375c-441a-a7d3-a830e9257ca2' and "users"."mbti" = (select "mbti_matches"."second_mbti" as "second_mbti" from "mbti_matches" where "mbti_matches"."first_mbti" = 'ISFP' and "mbti_matches"."second_mbti" = "users"."mbti" order by "mbti_matches"."score" desc limit 1) and "connect_requires"."status" = 'OPENING'
group by "connect_requires"."uuid" order by hobby_count DESC, mbti_matches.score DESC, users.trust_score DESC, "connect_requires"."created_at" desc
limit 10 offset 0
