OQL question

1
Hello, I have been working with OQL Queries for some time and I seem to be having a problem with the following Query. It work in a normal SQL  environment but does not seem to work in Mendix OQL. NOTE: I need to check for records trough out an entire year that is why I need a sum. The code is just smaller so it’s easy to read. Select sum(X) as total from( Select (select count(B9/RECORD)    from    Module.entity as B9    where B9/Year = B/Year    and B9/Month = 9    and B9/ID = B/ID )as X from Module.entity as B where B/Year = 2017) as sub this causes the following error: Caused by: com.mendix.connectionbus.ConnectionBusRuntimeException: Select columns with a sub query may only contains a * identifier.   The problem with this error is that is saying to the ‘select columns’ should identify with a *. However this will cause a deployment bug because * is not a valid identifier. The main thing that bugs me that SQL seems to have no problem with it but OQL just does not seem to get it. Is there a way to make this Query work in OQL?     Thanks in advance!
asked
0 answers