if you know what you're doing this is a trivial task. You can get you're data from ib and relay it to: influxdb, pipelinedb, timescale.com, apache pulsar or flink. Or write your own online algorithm for screening.
Getting realtime data and loading into a relational db to then use SQL is :banghead: