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 format (internal layout) of ?TIMESTAMP??
What is a LIKE table and how is it created?
Explain in detail about buffer manager and its functionalities?
What is a db2 collection?
What is multi row fetch in db2?
When would you prefer to use VARCHAR?
What is bufferpool in db2?
what is the sqlcode -501
What is the meaning of -805 SQL return code?
How can we retrieve the total number of records in RPG & CLLE?
Which command is used to connect to a database in DB2 ? Give the Syntax.
Can any one tell me about Restart logic in DB2.