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...

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


Please Help Members By Posting Answers For Below Questions

how to shutdown mysql server? : Sql dba

1081


what is data control language? : Sql dba

1003


what is the difference between myisam static and myisam dynamic? : Sql dba

1051


How many aggregate functions are available there in sql?

967


What is an index? What are the types of indexes? How many clustered indexes can be created on a table?

1052


how many tables will create when we create table, what are they? : Sql dba

1052


What are the various restrictions imposed on view in terms of dml?

957


How to change sql*plus system settings?

1041


How do I view a procedure in sql?

954


Is it possible to link two groups inside a cross products after the cross products group has been created?

992


Explain locks? : Transact sql

987


What are different types of sql commands?

1094


What is orm in sql?

1030


How do you create an update query?

947


What is function and procedure?

1017