|
Thank youprajna, SELECT C_CODE, C_NAME, SUBSTRing (F_CODE, P_NSTYLSTAR, P_NSTYLLEN) FA_CODE, F_NAME
FA_NAME, F_PRICE FA_PRICE, SUM (NUM_1) NUM_1, SUM (NUM_1 * F_PRICE)
SUM_1 GROUP BY C_CODE, FA_CODE ORDER BY C_CODE, FA_CODE
FROM PERCUR1
This is my source code, C_code is the store name code, C_NAME is the store name, FA_code is the clothing code, FA_NAME is the clothing name, FA_PRICE is the price, NUM_1 is the number of pieces, the latter column is the amount, I need so much data, but I must It is correct to add all the fields after GROUP by, and I only need to summarize C_code and FA_code. Is it necessary to add all the fields, or there are other good solutions! |
|