Q&A for those using, extending or developing Emacs
SELECT su.user_id, su.reputation, su.question_count, su.answer_count FROM dbo.sede_users AS su INNER JOIN dbo.Users AS u ON su.user_id = u.Id INNER JOIN dbo.sede_sites AS ss ON su.site_id = ss.site_id WHERE su.account_id = ##AccountId:int## AND ss.database_name = DB_NAME();