Which one of the following pairs of aggregate functions do
you use with character fields?
1. COUNT(field) and MAX(field)
2. AVG(field) and COUNT(field)
3. MIN(field) and SUM(field)
4. AVG(field) and MAX(field)
5. COUNT(field) and SUM(field)
Answer Posted / guru manohar
You can use COUNT(field),MIN(field),MAX(field) functions for
character fields.
For example there is a table called DEPARTMENTS contains the
data as shown below:
DEPARTMENT_ID DEPARTMENT_NAME
---------------------------------
10 Administrator
20 Marketing
50 Shipping
60 IT
1)SELECT COUNT(department_name)
From DEPARTMENTS;
Output: 4
Note: Bcoz there are 4 rows with DEPARTMENT_NAME
2)SELECT MAX(department_name)
From DEPARTMENTS;
Output: Shipping
Note: Bcoz Shipping comes last in sorting by Ascending
3)SELECT MIN(department_name)
From DEPARTMENTS;
Output: Administrator
Note: Bcoz Administrator comes first in sorting by Ascending
Is This Answer Correct ? | 7 Yes | 0 No |
Post New Answer View All Answers
Mention what is the plv (pl/vision) package offers?
Difference between table function and pipelined function?
Is it possible to create startup or shutdown trigger for on-schema?
How do I know if I have sql express or standard?
What are inner and outer joins examples of both?
How do I run a pl sql procedure in sql developer?
What is meant by temporal data?
how to delete duplicate rows from a join tables(I have three tables on that join) how do you know which join is need to be used? The select statement I have is: SELECT gc_skill_type.skill_type, gc_area_tec.area, gc_technology.technology, gc_technology.id_technology, gc_area_tec.id_area_tec FROM gc_skill_type, gc_area_tec, gc_technology WHERE gc_area_tec.id_skill_type (+) = gc_skill_type.id_skill_type AND gc_technology.id_area_tec (+) = gc_area_tec.id_area_tec order by gc_skill_type.skill_type asc, gc_area_tec.area asc, gc_technology.technology asc
State some properties of relational databases?
what is foreign key? : Sql dba
How to use sql*plus built-in timers?
what are the different type of sql's statements ? : Sql dba
What is replication id?
What is the difference between nvl function, ifnull function, and isnull function?
What is the file extension for sql database?