Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
We are aware of an issue with the Product Downloads page and looking into it.
cancel
Showing results for 
Search instead for 
Did you mean: 
MK_QSL
MVP
MVP

Script

How to write below SQL code in QlikView Script ?

Select

PARTNO,

MONTH(DATE) as MONTH,

YEAR(DATE) as YEAR,

SUM(QTY),

SUM(SALESAMT),

SUM(COSTAMT)

From SALES

Group By PARTNO, MONTH(DATE), YEAR(DATE)


Thanks in advance !!

Labels (1)
1 Reply
tresB
Champion III
Champion III

Try something like:

Table1:

Load

PARTNO,

MONTH(DATE) as MONTH,

YEAR(DATE) as YEAR

From  SALES;

Table2:

Load *,

SUM(QTY) as Tot_Qty,

SUM(SALESAMT) as Tot_Sales,

SUM(COSTAMT) as Tot_CstAmt

Resident Table1

Group By PARTNO, MONTH, YEAR ;