SELECT $__timeInterval(time),
    any(open) as open,
    max(high) as high,
    min(low) as low,
    anyLast(close) as close,
    sum(volume) as volume
FROM bars FINAL
WHERE $__timeFilter(time)
    AND symbol = '${bars}'
GROUP BY time;

SELECT time_created AS time,
    headline
FROM news FINAL
WHERE $__timeFilter(time)
    AND hasAny(symbols, [${news}])
ORDER BY time ASC;
