Hi everybody,
I am writing an SQL query of the following form:
SELECTSELECTCOUNTwhere Condition1 depends on user and is the same for all four COUNT(*) subqueries. This query is very slow, and I believe that it can be sped up significantly if Condition1 would be checked once rather than four times. With a Common Table Expression, the query could select based on Condition1 once and then reuse the results:
WITH cte However, as far as I know, IRIS does not support Common Table Expressions. Is it possible to achieve similar results using the functionality available in IRIS? Thanks!

.png)
.png)
.png)
This project is implemented as a tool for viewing temperature data taken from a temperature sensor installed in Rasperry PI and located in a remote place where there is Internet, for example, in