0 - 1 of 1 tags for Coding

Hello, 
I'm super new to TD and SQL. This code was given to by a co-worker. It works but very slow. Is there a way to speed it up  using 'Interval' and 'Timestamps'?
SELECT DISTINCT

TimeStamp(FORMAT 'YYYYMMDD') (CHAR(8))  AS CALL_DT,

TimeStamp(FORMAT 'HH:MI:SS') (CHAR(8))  AS CALL_TIME,

CASE WHEN TEMP1>=240000