Notices where this attachment appears
-
Embed this notice
@j @lanodan @hj probably easier to run two queries than complicate the sql futher
select concat(nickname, '@bae.st') from users join (select following_id from following_relationships where follower_id = (select id from users where nickname = 'CHANGEME')) as _user on users.id = _user.following_id where users.local = 't';
select nickname from users join (select following_id from following_relationships where follower_id = (select id from users where nickname = 'CHANGEME')) as _user on users.id = _user.following_id where users.local = 'f';
-
Embed this notice
@i @j @lanodan @hj
>easier to run two queries
Why not just union these queries?
select concat(nickname, '@bae.st')
from users
join (
select following_id
from following_relationships
where follower_id = (
select id
from users
where nickname = 'CHANGEME'
)
) as _user on users.id = _user.following_id
where users.local = 't'
union
select nickname
from users
join (
select following_id
from following_relationships
where follower_id = (
select id
from users
where nickname = 'CHANGEME'
)
) as _user on users.id = _user.following_id
where users.local = 'f';