![]() ![]() If you get stuck, post CREATE TABLE and INSERT statements for your sample data, the exact results you want from that data, and your best attempt at a query. Compute the COUNTs in a sub-query, save the results in a new column, then use that column in the WHERE clause of a super-query. Perhaps you want to use the analytic COUNT function, not the aggregate COUNT. GROUP BY aggregates the results on the basis of selected column: COUNT, MAX, MIN, SUM, AVG, etc. Having count( distinct ID)=count( distinct AMT)Īggregate and analytic functions, such as COUNT, are computed after the WHERE clause has been applied., so you can never use them in a WHERE clause. GROUP BY Clause is utilized with the SELECT statement. ![]() I have tried following query but it is not working
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |