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 name of the default db2 catalog database?
What techniques are used to retrieve data from more than one table in a single SQL statement?
what is a collection?
What is a page in db2?
can we update the table by using cursors can anyone post the query?
What is the role of data manager in the db2 database?
Which isolation level provides highest data integrity?
What can the Locate option of the Repair Utility accomplish?
What is check constraint in db2?
What are union and union all?
What is normalization and what are the five normal forms?
What is db2 plan table?