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 query_cache_limit?
I have 3 cursors declared. Cursor1 retieves some data. Based on this curso2 will also fetches some data. In cursor3 (using for some updation) I'm using the data retrieved by the above 2 cursor. My question is, while working with cursor3, periodically if I give commit, will all the three crsors will be closed or only cursor3 will be closed?
what is check point and restart Logic ? why do we go for that ??
What is the syntax of SELECT statement when embedded in a COBOL program?
Which catalog tables contain authorization information?
Usually, which is more important for DB2 system performance - CPU processing or I/O access?
How to find primary key of a table in db2?
i have a table like this : Name ADDRESS Toto 123 ... Toto 456 ToTo 678 I would like to delete 2 last row...please tell me how to delete its
What is buffrpool? Where we use it ?
How do you filter out the rows retrieved from a Db2 table ?
What is the significance of DB2 free space and what parameters control it?
Generally if I want to select the names starting with c I need to use c% But how could I code to select the data which contains % as a part of data.