Db query error: sql: expected 30 arguments, got 0

i have a constant variable Shift1_StartTime whose value is ‘7:30:00’
and i have a sql query "WITH DataLogKWH AS (
SELECT
SourceID,
TimestampUTC,
Value - LAG(value, 1, 0) OVER (PARTITION BY SourceID ORDER BY TimestampUTC) AS actual_value
FROM [ION_Data].[dbo].[vDataLogKWH]
)

SELECT SUM(actual_value)
FROM DataLogKWH
WHERE
SourceID IN (${Compressors}) AND
TimestampUTC >= CAST(CAST(DATEADD(DAY, -1, GETDATE()) AS DATE) AS DATETIME) + CAST(${Shift1_StartTime} AS TIME)
"
however i try use Shift1_StartTime varibale in this query, this gives me error. need your help as i am new to grafana. Thanks .

Welcome @jitendersinghjs1998

Is Compressors variable an integer or string? Can you show us how you build the query for that variable?

compressor is a variabe. the problem is in this line CAST(${Shift1_StartTime} AS TIME), i f i remove this part the query work fine. but i need to use that so that i can filter by shift timings


image