Permalink
Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
18 lines (17 sloc) 737 Bytes
select distinct
ZSLKMESSAGE.ZUSERID as MessageGeneratedFrom,
ZSLKCOREDATAUSER.ZREALNAME as MessageGeneratedFromName,
ZSLKCOREDATAUSER.ZNAME as MessageGeneratedFromNameAlt,
ZSLKBASECHANNEL.ZNAME as MessageSentToChannelName,
ZSLKMESSAGE.ZTEXT,
datetime(ZSLKMESSAGE.ZTIMESTAMP, 'unixepoch', 'localtime') as MessageTimeStamp,
ZSLKMESSAGE.ZFILEIDS,
json_extract(ZFILEIDS, '$[0]') as HasSharedFile,
ZSLKMESSAGE.ZCHANNELID,
ZSLKBASECHANNEL.ZTSID,
ZSLKBASECHANNEL.ZTSID1,
ZSLKCOREDATAUSER.ZTSID
from ZSLKMESSAGE, ZSLKBASECHANNEL,ZSLKCOREDATAUSER
where ZSLKCOREDATAUSER.ZTSID = ZSLKMESSAGE.ZUSERID and
(ZSLKBASECHANNEL.ZTSID = ZSLKMESSAGE.ZCHANNELID or ZSLKBASECHANNEL.ZTSID1 = ZSLKMESSAGE.ZCHANNELID)
order by ZSLKMESSAGE.ZTIMESTAMP