Skip to content

Instantly share code, notes, and snippets.

Greggers gregaeq

Block or report user

Report or block gregaeq

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@gregaeq
gregaeq / Member.sql
Last active Apr 30, 2018
GetMembersWithIsContactAndIsInviteForUserId
View Member.sql
SET @Test = "08770871-df3b-4d02-ae40-fd9bb340b39a";
SELECT UUID_FROM_BIN(T1.user_id) as UUID, group_id,
(
SELECT COUNT(id) > 0
FROM contact
WHERE sender_id = T1.user_id AND recipient_id = UUID_TO_BIN(@Test)
OR sender_id = UUID_TO_BIN(@Test) AND recipient_id = T1.user_id
) as Is_Contact,
(
You can’t perform that action at this time.