consider some table with 4 r 5 columns in that 1 col is
DATE type. The data is like that,For each date in that col
some 3 fields r there but all the records r having
different data. Now i want to display all the columns by
performing grouping on the date field ( as SELECTION
Operator(*) cannot be used with group function having only
one "group by clause". how to do this? can any one help me
in finding out the solution plss?
Answer / mukti singh
First of all you need to understand that purpose of
grouping.
Group by is used when you need to club a few columns on the
basis of one column, for this you need to use some
aggregate functions,
for eg. for a table test
a b c
1 2 29-JUN-08
1 4 29-JUN-08
3 5 04-JUL-08
13 15 05-JUL-08
you can group a and b on c as follows:-
select count(a), max(b), c from test
group by c
count(a)max(b) c
2 4 29-JUN-08
1 5 04-JUL-08
1 15 05-JUL-08
Is This Answer Correct ? | 0 Yes | 0 No |
I have created one package with out procedures in package specification and in package body i have used 2 procedures. is it compile????
Give syntax for SQL and ORACLE joins.
How to add another datafile to a tablespace?
Explain the characteristics of oracle dba?
How to find the duplicate rows count from employees table in oracle?
Difference between join and a subquery?
8 Answers Base Automation, NMDC,
while i take backup using ibm tsm the following errors occurred: rman-03009 ora-19513 ora-27206 ora-19502 ora-27030 ora-ora19511
10)In an RDBMS, the information content of a table does not depend on the order of the rows and columns. Is this statement Correct? A)Yes B)No C)Depends on the data being stored D)Only for 2-dimensional tables
Can we use bind variables in oracle stored procedure?
what are archived logs?
What is not equal to in oracle?
How to divide query output into groups in oracle?