Can we use group-by clause in sub-query? If 'yes'
means,Will it be executed successfully or else If 'no'
means why should we not using that method? Give me your
suggestion please....
Answer / db2222
Yes, we can use the Group-by in the subquery.
-----EX----
SELECT DISTINCT(A.IDN), B.NAME,B.EFF_DATE, B.CNCRCY_TMSTMP
FROM
Table1 A,
Table2 B,
Table3 C
WHERE
A.IDN = C.IDN
AND C.IDN = B.ALIAS_IDN
AND A.IDN IN
(SELECT IDN
FROM Table4
GROUP BY CUSACC_IDN
HAVING COUNT(*) > 1
)
WITH UR;
| Is This Answer Correct ? | 0 Yes | 0 No |
What is the purpose of the DSNC transaction ?
What does a deadlock mean in DB2?
can we view the access paths created by dbrm ? how ? thx
How does db2 sample database connect?
How to run db2 command in windows?
For update of a row in cursors, when do we move value into host variable in cobol progrm? is it before open or before fetch ?
how do u update the faltfile into db2 table ?
What are the abend codes occour in ur latest PROJECT in DB2
pls tell me abt the normalization five types....
How to know the primary key of a table without defining the primary key in the table?
What is a page?
how does the defining of a stored procedure effect the size of a DB2 data base A) it increases the size of a data base B) it decreases the size of a data base C) it does not effect the size of the data base D) it changes the table space structures