comment-server/scripts/scripts.sql

56 lines
1.7 KiB
MySQL
Raw Normal View History

SELECT CHANNEL.Name, CHANNEL.ClaimId
FROM COMMENT, CHANNEL
WHERE COMMENT.CommentId = '086326d98f2ed7ebd768a22c897baeff4abbbb42' AND
CHANNEL.ClaimId = COMMENT.ChannelId;;
SELECT * FROM COMMENT WHERE ParentId IS NOT NULL ;
SELECT CHANNEL.Name, CHANNEL.ClaimId, COMMENT.CommentId
FROM COMMENT, CHANNEL
WHERE COMMENT.CommentId = '85b71ae9ca14720774fd6af7a1e4954797ccfbd1b8b4303747d02a3f415b6d5b'
AND COMMENT.ChannelId = CHANNEL.ClaimId
;
SELECT ClaimId
FROM CHANNEL
WHERE ClaimId IN (
SELECT ChannelId
FROM COMMENT
WHERE CommentId = '85b71ae9ca14720774fd6af7a1e4954797ccfbd1b8b4303747d02a3f415b6d5b'
);
SELECT CHANNEL.Name, CHANNEL.ClaimId, COMMENT.CommentId
FROM CHANNEL, COMMENT
WHERE COMMENT.CommentId = '85b71ae9ca14720774fd6af7a1e4954797ccfbd1b8b4303747d02a3f415b6d5b'
AND COMMENT.ChannelId AND COMMENT.ChannelId = CHANNEL.ClaimId
;
SELECT ChannelId
FROM COMMENT
WHERE COMMENT.CommentId = '85b71ae9ca14720774fd6af7a1e4954797ccfbd1b8b4303747d02a3f415b6d5b'
;
SELECT ClaimId, Name FROM CHANNEL
INNER JOIN COMMENT C on CHANNEL.ClaimId = C.ChannelId
WHERE C.CommentId = '85b71ae9ca14720774fd6af7a1e4954797ccfbd1b8b4303747d02a3f415b6d5b' AND C.ChannelId IS NOT NOT NULL
;
SELECT * FROM CHANNEL WHERE ClaimId = (SELECT ChannelId FROM COMMENT WHERE ChannelId = ClaimId AND CommentId = '85b71ae9ca14720774fd6af7a1e4954797ccfbd1b8b4303747d02a3f415b6d5b');
SELECT * FROM CHANNEL WHERE ClaimId = (SELECT ChannelId FROM COMMENT WHERE ChannelId = ClaimId AND CommentId = '85b71ae9ca14720774fd6af7a1e4954797ccfbd1b8b4303747d02a3f415b6d5b');
SELECT DISTINCT channel_id, channel_name FROM COMMENTS_ON_CLAIMS
WHERE comment_id = '85b71ae9ca14720774fd6af7a1e4954797ccfbd1b8b4303747d02a3f415b6d5b'
;