My project requirement involves implementing query builder in UI. Can
anyone suggest how to build complex queries. I could build a query builder
than can build simple select queries. But that is not enough. Any pointer
to this will be really helpful. PFB.
Currently I am able to implement query in the below format:
Select Firstname,Lastname,Birthdate,City,Country,Gender from Table1,Table3
*where* Table1.Country = Table3.Country *AND* City =Kolkata *groupby*
Firstname,Lastname,Birthdate,City,Country,Gender
Required complex query to be built using query builder:
e.g., SELECT
TXN_DT,
MKT_KEY,
CHNL_KEY,
BRD_KEY
,SUM(CASE WHEN SLS_RTN_IND = 'Y' THEN -1 * ITM_QTY ELSE ITM_QTY END) AS
LN_TOT_UN_SLS_QTY
,SUM(DNRM_NET_DSCT_UN_PRC_AMT * ITM_QTY) AS LN_TOT_XTD_NET_DSCT_UN_PRC_AMT
FROM VIEWSLS.TSTIW_SLS_TXN_LN_ITM_FCT A
JOIN viewfndt.TSCFD_SUP_CHN_FLATTENED_DIM B
ON A.loc_key = B.loc_key
WHERE TXN_DT = '2016-01-02'
AND SLS_AUD_STAT_CD IN ('A')
AND MKT_KEY = 1
AND CHNL_KEY=1
AND VD_IND = 'N'
AND TXN_ITM_TYP_CD = 'M'
GROUP BY 1,2,3,4;
THANKS IN ADVANCE!!!
--
You received this message because you are subscribed to the Google Groups
"Angular and AngularJS discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.