Hell All,
I have this query
"with DISTINCT_GROUP_MARGINS AS (
SELECT distinct CUSTOMER_GROUP, FX_MARGIN
FROM FCUBS.FXTM_CUST_MARGIN_CUSTOM
WHERE record_stat =‘O’ and AUTH_STAT=‘A’ and CUSTOMER=‘ALL’
AND ( CUSTOMER_GROUP LIKE ‘B%’)
),MAX_MIN_MARGINS AS (
SELECT CUSTOMER_GROUP, MAX(FX_MARGIN) AS MAX_MARGIN, MIN(FX_MARGIN) AS MIN_MARGIN
FROM DISTINCT_GROUP_MARGINS
GROUP BY CUSTOMER_GROUP
)SELECT CUSTOMER_GROUP, MAX_MARGIN
FROM MAX_MIN_MARGINS
WHERE MAX_MARGIN = MIN_MARGIN
AND MAX_MARGIN = 0.6order by CUSTOMER_GROUP
;"
how to format this query ! i know the passing variable is ‘{var}’ but its not happy with
With, like …%…etc
Thanks in advance