on 2020 Jun 29 7:31 PM
Hi,
I'm trying to build a simple select. It would be something like this:
select <one_field, count(<one_field>) from aTable group by <one_field>
Quite simple, huh? But unfortunately it looks like count, sum, max and so on are not supported in CQL. Or maybe I wasn't able to find a way to do it.
Will I have to do all the calculations in the events? Or there is a way to ask Hana to do the "hard job" (not a big deal for Hana, anyway)?
Thanks in advance for your help,
David R.
Help others by sharing your knowledge.
AnswerRequest clarification before answering.
Hi David,
Thank you for the example here, now I understand the source of the misunderstanding. I was using CQL in a custom handler, not in the view definition. I tried the following and it works for me:
entity ITContact {
key ID: Integer;
...
}
entity ItTest as select from ITContact {ID, count(ID) as count: Integer}
group by ID;
Could you please try it out and let me know if this solves your problem?
Best regards,
Olena
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
All right, it was exactly what I was looking for. Let me know your favourite bar/pub in town, please, a round of beers is on me! 😉
Have a nice day,
David R.
User | Count |
---|---|
33 | |
21 | |
16 | |
8 | |
8 | |
6 | |
5 | |
4 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.