question

HIROYUKINAKAYAMA-3345 avatar image
0 Votes"
HIROYUKINAKAYAMA-3345 asked HIROYUKINAKAYAMA-3345 answered

Does Stream Analytics query support simple binary operators (like + - etc)?

Azure Stream Analytics supports subset of Transaction-SQL and is explained by below document.

Stream Analytics Query Language Reference
stream-analytics-query-language-reference

But I cannot find the simple binary operators (such as +, - etc) in this document.
Does Stream Analytics query really support this kind of simple operators appears in T-SQL specification?

Arithmetic Operators (Transact-SQL)
arithmetic-operators-transact-sql

Thanks,

azure-stream-analytics
· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hello @HIROYUKINAKAYAMA-3345,


Just wanted to follow up and check if the below suggestion helped you resolve the issue . Also if case if you have a better work around or resolution please do share that with the community as it will help other community members .


Thanks & stay safe
Himanshu


0 Votes 0 ·
HimanshuSinha-MSFT avatar image
0 Votes"
HimanshuSinha-MSFT answered

Hello HIROYUKINAKAYAMA-3345,

We can use the binary operator for BIT/DOUBLE/BIGINT datatypes.

Thanks & stay safe

Himanshu


Please do consider to click on "Accept Answer" and "Up-vote" on the post that helps you, as it can be beneficial to other community members

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

HIROYUKINAKAYAMA-3345 avatar image
0 Votes"
HIROYUKINAKAYAMA-3345 answered

Thanks, HimanshuSinha-5732!

Now I found the Steam Analytics one sample SQL doing below calculations in SELECT.

(bidPrice + askPrice)/2 AS midPrice,


(midPrice1 + midPrice2 + midPrice3 + midPrice4 + midPrice5 + midPrice6 + midPrice7 + midPrice8 + midPrice9 + midPrice10)/10.0 - midPrice AS y,

a + b1 x1 + b2 x2 AS efpc

from stream-analytics-high-frequency-trading

Then I can imagine what kind of calculations are accepted by Stream Analytics T-SQL, yet I cannot find one definitive document on this topic.

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.