Interview Questions

Q:

What are aggregate functions in SQL? What are those functions?

Answer

Aggregate functions in SQL are used to perform calculation on data. These functions are inbuilt in SQL and return a single value.

SUM( )



SUM function returns the sum or addition of all NOT NULL values of a column. For e.g. I have a Table employee with the fields id, name, salary and I want the sum of all salaries, I can use SUM function as shown
SELECT SUM(emp_salary) from employee;
Hence, if my column emp_salary has values 20,000, 22,000, 21,000; the output will be 63,000

AVG( )


 
AVG function returns the average of all NOT NULL values of a column. For e.g. I have a Table employee with the fields id, name, salary and I want the average of all salaries, I can use AVG function as shown
SELECT AVG(emp_salary) from employee;
Hence, if my column emp_salary has values 20,000, 22,000, 21,000; the output will be 21,000

COUNT( )



COUNT function returns the number of rows or values of a table. For e.g. I have a Table employee with the fields id, name, salary and I want the count of all rows, I can use COUNT function as shown
SELECT COUNT(*) from employee;

Max ( ) and Min ( )



MAX function returns the largest value of a column in a table. For e.g. I have a Table employee with the fields id, name, salary and I want the maximum salary of an employee, I can use MAX function as shown
SELECT MAX(emp_salary) from employee;
Hence, if my column emp_salary has values 20,000, 22,000, 21,000; the output will be 22,000



MIN function returns the smallest value of a column in a table. For e.g. I have a Table employee with the fields id, name, salary and I want the minimun salary of an employee, I can use MIN function as shown
SELECT MIN(emp_salary) from employee;
Hence, if my column emp_salary has values 20,000, 22,000, 21,000; the output will be 20,000

Report Error

View answer Workspace Report Error Discuss

Subject: Oracle

0 3151
Q:

What is the difference between finance and accounts? most of the companies having a different section like finance and accounts. why they aren't had only single section neither finance nor accounts?

Answer

Finance:It is the branch of economics that studies the management of money and other assets.In simpler terms it can be defined as the commercial activity of providing funds and capital.It addresses questions like -- what funds are required by the org & How they can be raised &  How they have to be allocated etc.


Accounts: It is the occupation of maintaining and auditing records and preparing financial reports for a business. Accounts provides quantitative information about finances. It addresses issues like what amount of funds have been allocated to various activities, how the book-keeping is being done etc.


Both functions are distinct but complimentary to each other.


Finance and accounts are highly specilized and distinct areas and hence most organizations have seperate sections of finance and accounts.

Report Error

View answer Workspace Report Error Discuss

0 3143
Q:

What is salary TDS?

Answer

Means whatever income any employee received from the organisation and on that tax to be deducted. (e.g. Gross salary, Overtime, Bonus, Incentives etc.)

Report Error

View answer Workspace Report Error Discuss

0 3142
Q:

Explain one-definition rule (ODR).

Answer

According to one-definition rule, C++ constructs must be identically defined in every compilation unit they are used in. 


As per ODR, two definitions contained in different source files are called to be identically defined if they token-for-token identical. The tokens should have same meaning in both source files. 


Identically defined doesn’t mean character-by-character equivalence. Two definitions can have different whitespace or comments and yet be identical.

Report Error

View answer Workspace Report Error Discuss

Subject: C++

0 3137
Q:

Financial statements are prepared in the following order.

A) Income statement - Balance sheet - Statement of retained earnings B) Income statement - Statement of retained earnings - Balance sheet
C) Balance sheet - Statement of retained earnings - Income statement D) Statement of retained earnings - Balance sheet - Income statement
 
Answer & Explanation Answer: B) Income statement - Statement of retained earnings - Balance sheet

Explanation:

The financial statements should be prepared in the following order:


Income statement - Statement of retained earnings - Balance sheet

 

1. Income statement reports revenues and expenses and calculates net income or net loss for the time period.

2. Statement of retained earnings show how retained earnings changed during the period due to net income or net loss and dividends.

3. Balance sheet reports assets, liabilities, and stockholders’ equity as of the last day of the period.

Report Error

View Answer Report Error Discuss

Filed Under: Accounts Payable
Exam Prep: AIEEE , Bank Exams , CAT
Job Role: Analyst , Bank Clerk , Bank PO

2 3136
Q:

Which of the following modifiers can be used with Local inner class?

A) Final or Abstract B) Final or Transcient
C) Abstract or Transcient D) Final or public
 
Answer & Explanation Answer: A) Final or Abstract

Explanation:

It can either be Final or Abstract

Report Error

View Answer Report Error Discuss

Filed Under: Java

0 3135
Q:

What is currency in IDMS?

Answer

Currency is the location within the database during run-unit execution.


There are four levels of currency:


- Current of run-unit is the record occurrence of the last successful find or obtain;


- Current of record type is for the most recent of each record type;


- Current of record set is the most recent within each set 


- Current of area is within each area.

Report Error

View answer Workspace Report Error Discuss

0 3134
Q:

What are the operators available in dynamic memory allocation?

A) new B) delete
C) compare D) both a & b
 
Answer & Explanation Answer: D) both a & b

Explanation:

new and delete operators are mainly used to allocate and deallocate
during runtime.

Report Error

View Answer Report Error Discuss

Filed Under: C++

1 3134