Appian Community
Site
Search
Sign In/Register
Site
Search
User
DISCUSS
LEARN
SUCCESS
SUPPORT
Documentation
AppMarket
More
Cancel
I'm looking for ...
State
Not Answered
Replies
3 replies
Subscribers
7 subscribers
Views
1775 views
Users
0 members are here
Share
More
Cancel
Related Discussions
Home
»
Discussions
»
AI and Rules
I would like to execute the below SQL query for one of my requirement. How to do
ramakg
A Score Level 1
over 8 years ago
I would like to execute the below SQL query for one of my requirement. How to do it through the queryEntity?
select max(column) from tablename where filedname=1 and filedname=2
Thanks in advance.
OriginalPostID-211372
OriginalPostID-211372
Discussion posts and replies are publicly visible
0
Jacob Cohen - Project Leader - Macedon Technologies
over 8 years ago
You need to use a query aggregation. You can find an example here:
forum.appian.com/.../Query_Recipes.html
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
nageswararaoa
over 8 years ago
Hi Rama try with the below code
a!queryEntity(
entity: cons!Entity_constant,
query: a!query(
aggregation: a!queryAggregation(aggregationColumns: {
a!queryAggregationColumn(field: "column1", isGrouping: true),
a!queryAggregationColumn(field: "column2", aggregationFunction: "MAX")
}),
logicalExpression:
a!queryLogicalExpression(
operator: "AND",
filters: {
a!queryFilter(field: "fileld_name1", operator: "=", value: 1),
a!queryFilter(field: "fileld_name2", operator: "=", value: 2)}),
,
pagingInfo: local!pagingInfo
))
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
ramakg
A Score Level 1
over 8 years ago
thank you nageswara rao
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel