Skip to content

Instantly share code, notes, and snippets.

@book000
Created December 20, 2025 20:11
Show Gist options
  • Select an option

  • Save book000/d95b872718e90b70e46b45c476821e70 to your computer and use it in GitHub Desktop.

Select an option

Save book000/d95b872718e90b70e46b45c476821e70 to your computer and use it in GitHub Desktop.
共通の友人を非表示にしているユーザーを抽出するVRCX.sqlite3へのSQL
WITH mutual_friend_ids AS (
SELECT uid, COUNT(*)
FROM (
SELECT friend_id AS uid
FROM usr0b83d9be985242dd98e2625062400acc_mutual_graph_links
UNION ALL
SELECT mutual_id AS uid
FROM usr0b83d9be985242dd98e2625062400acc_mutual_graph_links
)
WHERE uid <> 'usr_00000000-0000-0000-0000-000000000000'
GROUP BY uid
),
friend_list AS (
SELECT user_id, display_name
FROM usr0b83d9be985242dd98e2625062400acc_friend_log_current
)
SELECT *
FROM friend_list
LEFT JOIN mutual_friend_ids
ON friend_list.user_id = mutual_friend_ids.uid
WHERE mutual_friend_ids.uid IS NULL
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment