Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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 Posted / 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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Give the name of some fields form sqlca.

1040


What's The Error Code For Unique Index Voilation?

1178


have 3 tables table1, table2 and table3 which contains employee information. table1 is master table, table2 contains emp details like emp no and so on, table 3 contains emp salary. so if any emp leave company between 25th - 30th of every month it has to get updated in tables. but it is not getting updated. What is the reason.

1685


What is schema in db2?

979


What is a collection in db2?

1000


What happens in bind step in a db2 program?

936


What is runstats and reorg in db2?

1258


what is db2 restart?

2115


What is the difference between cursor stability and repeatable read isolation levels?

1137


What is the difference between plan and package in db2?

1060


Explain correlated sub-queries.

992


What is ibm db2 client?

898


On which levels locks can be applied?

1078


Explain in detail about buffer manager and its functionalities?

1022


How can we read records for specific member in CL? AND rpg?

663