1
Fork 0
mirror of https://github.com/RYGhub/royalnet.git synced 2024-11-22 11:04:21 +00:00
royalnet/migrations/2024-07-03-233850_view_users/up.sql

6 lines
273 B
SQL

CREATE VIEW view_ids AS
SELECT users.username, users.id, telegram.telegram_id, discord.discord_id, steam.steam_id
FROM users
JOIN telegram ON users.id = telegram.user_id
JOIN discord ON users.id = discord.user_id
JOIN steam ON users.id = steam.user_id;