Saturday 16 July 2011

ORACLE INTERVIEWS QUESTION

Oracle Interview Questions and Answers : SQL
1. To see current user name
Sql> show user;

2. Change SQL prompt name
SQL> set sqlprompt “Manimara > “
Manimara >
Manimara >

3. Switch to DOS prompt
SQL> host

4. How do I eliminate the duplicate rows ?
SQL> delete from table_name where rowid not in (select max(rowid) from table group by
duplicate_values_field_name);
or
SQL> delete duplicate_values_field_name dv from table_name ta where rowid <(select min(rowid) from
table_name tb where ta.dv=tb.dv);
Example.
Table Emp
Empno Ename
101 Scott
102 Jiyo
103 Millor
104 Jiyo
105 Smith
delete ename from emp a where rowid < ( select min(rowid) from emp b where a.ename = b.ename);
The output like,
Empno Ename
101 Scott
102 Millor
103 Jiyo
104 Smith

5. How do I display row number with records?
To achive this use rownum pseudocolumn with query, like SQL> SQL> select rownum, ename from emp;
Output:
1 Scott
2 Millor
3 Jiyo
4 Smith

6. Display the records between two range
select rownum, empno, ename from emp where rowid in
(select rowid from emp where rownum <=&upto
minus
select rowid from emp where rownum<&Start);
Enter value for upto: 10
Enter value for Start: 7
ROWNUM EMPNO ENAME
--------- --------- ----------
1 7782 CLARK
2 7788 SCOTT
3 7839 KING
4 7844 TURNER

7. I know the nvl function only allows the same data type(ie. number or char or date
Nvl(comm, 0)), if commission is null then the text “Not Applicable” want to display, instead of
blank space. How do I write the query?
SQL> select nvl(to_char(comm.),'NA') from emp;
Output :
NVL(TO_CHAR(COMM),'NA')
-----------------------
NA
300
500
NA
1400
NA
NA

8. Oracle cursor : Implicit & Explicit cursors
Oracle uses work areas called private SQL areas to create SQL statements.
PL/SQL construct to identify each and every work are used, is called as Cursor.
For SQL queries returning a single row, PL/SQL declares all implicit cursors.
For queries that returning more than one row, the cursor needs to be explicitly declared.

9. Explicit Cursor attributes
There are four cursor attributes used in Oracle
cursor_name%Found, cursor_name%NOTFOUND, cursor_name%ROWCOUNT, cursor_name%ISOPEN

10. Implicit Cursor attributes
Same as explicit cursor but prefixed by the word SQL
SQL%Found, SQL%NOTFOUND, SQL%ROWCOUNT, SQL%ISOPEN
Tips : 1. Here SQL%ISOPEN is false, because oracle automatically closed the implicit cursor after
executing SQL statements.
: 2. All are Boolean attributes.

11. Find out nth highest salary from emp table
SELECT DISTINCT (a.sal) FROM EMP A WHERE &N = (SELECT COUNT (DISTINCT (b.sal)) FROM EMP B
WHERE a.sal<=b.sal);
Enter value for n: 2
SAL
---------
3700

12. To view installed Oracle version information
SQL> select banner from v$version;

13. Display the number value in Words
SQL> select sal, (to_char(to_date(sal,'j'), 'jsp'))
from emp;
the output like,
SAL (TO_CHAR(TO_DATE(SAL,'J'),'JSP'))
--------- -----------------------------------------------------
800 eight hundred
1600 one thousand six hundred
1250 one thousand two hundred fifty
If you want to add some text like,
Rs. Three Thousand only.
SQL> select sal "Salary ",
(' Rs. '|| (to_char(to_date(sal,'j'), 'Jsp'))|| ' only.'))
"Sal in Words" from emp
/
Salary Sal in Words
------- ------------------------------------------------------
800 Rs. Eight Hundred only.
1600 Rs. One Thousand Six Hundred only.
1250 Rs. One Thousand Two Hundred Fifty only.

14. Display Odd/ Even number of records
Odd number of records:
select * from emp where (rowid,1) in (select rowid, mod(rownum,2) from emp);
1
3
5
Even number of records:
select * from emp where (rowid,0) in (select rowid, mod(rownum,2) from emp)
2
4
6

15. Which date function returns number value?
months_between

16. Any three PL/SQL Exceptions?
Too_many_rows, No_Data_Found, Value_Error, Zero_Error, Others

17. What are PL/SQL Cursor Exceptions?
Cursor_Already_Open, Invalid_Cursor

18. Other way to replace query result null value with a text
SQL> Set NULL ‘N/A’
to reset SQL> Set NULL ‘’

19. What are the more common pseudo-columns?
SYSDATE, USER , UID, CURVAL, NEXTVAL, ROWID, ROWNUM

20. What is the output of SIGN function?
1 for +ve
0 for zero.
-1 for –ve.

21. What is the maximum number of triggers, can apply to a single table?
12 triggers.

features of windows8 os

New features of Windows 8 OS

Windows 8 will be released in year 2012 but still we have leaked inventions about Windows operating system.In this article I will explain to you various new features of Windows 8 operating system in full detail.


Click Here


We know that Windows 7 operating system is developed by Microsoft just to remove the limitations and slow speed of previous Windows based versions. This time around Microsoft is looking for
the release of 
new operating system which is already famous with the name of Windows 8 operating system. A lot of rumor based information already there on the Internet which depicts that Windows 8 will be going to be released in year 2012.Hence, through this article I will explain to you expected inventions about Windows 8 operating system.

Internet world is full of rumored 
information about Windows 8 operating system. Out of following leaked information of rumors, I selected few inventions which look genuine and original and all these features are explained below-

In the previous few days, we have seen a lot more about cloud computing, It is expected to be a future based technology because it is capable of storing a huge amount of data on the web servers such that multiple request of data storage is handled by it by making use of multi-tasking operating system principle.

One more expecting feature is leaked few days back which shows that Windows 8 operating 
system supports portability according to which we can install the Windows 8 at any time. It supports USB drive installation by booting the Windows 8 setup even from the pen drive and set its booting priority automatically. All you have to do is press keys at regular interval of time so to allow proper booting of system programs.

Microsoft has added a new app store for Windows 8 which provides you with millions of applications. All you have to do is to have high speed internetconnection which offers high 
internet connectivity throughout the globe so that apps can be easily downloaded from the Internet world when required. Moreover, the toolbar and ribbon based interface of Windows 8 office package is also improved which going to enhance the speed and performance of Windows 8 operating system in comparison with earlier Windows based versions.

The Arm based processor chip is implemented by it which allows the processing of about 128 bit of data. The new tablet based interface is also there in Windows 8 that allows users to select the input even from the computer screen by just clicking on the screen. Due to this fact only it is used by the professors and mathematicians to add mathematical and trigonometry formula to 
the system.

Inbulit support for the PDF file system allows you to view the PDF based files from the client side and even from the server side by using the Abode reader software. In spite of this, you can also make use of the 3 dimensional graphical user interface which cannot allow users to get stick with the 2 dimensional views. So, it is expected that Windows 8 will also have 3 Dimensional graphical support. 


Sunday 26 June 2011

Body Language in Interviews

The following quiz will ask you a variety of questions about your non-verbal communication in interviews. Don't take it too seriously, but it should provide some useful pointers on what to do and what not to do.

1. In a job interview, a student being interviewed in posture A suddenly moved to posture B.
Give a possible explanation.

A. The interviewee feels defensive
B. The interviewee feels cold
C. The interviewee is becoming more relaxed

2. A piece of research showed that when people meet for the first time, there are three important factors. These are given below.
Which is the most important?


A. Content - what they say.
B. How they sound (tone of voice - accent, pitch, variation and tempo of speech).
C. Body Language.

3. Another piece of research found that certain non-verbal behaviours (e.g. not including dress and appearance) showed a statistically significant correlation with job interview success.
Name ONE of these behaviours from the list below:


A. Firm handshake
B. Regular eye contact
C. Sitting up straight
D. Smiling
E. Head nodding
F. Loud voice

4. Which of the following statements are likely to be true about the two people here?


A. They are of similar status. They agree with each others views.
B. They are of different status. They disagree with each other.






5) Based on the positions of the desk and chairs as you enter the room, which of these two interviews are likely to be the more formal?


 
A.
B.

 

 

 

 

6). Whilst on holiday in Greece, you end up one day at a little out of the way Greek village where nobody speaks English. You decide to study job opportunities at the local taverna with your 4 companions and try to order a round of 5 drinks signing with your hands. What happens next?


A. You are treated like a long-lost relative
B. You wake up in hospital with 2 black eyes, and a bruised ego.

RESULTS

 

RESULTS OF THE QUIZ


10 points or more and you are a body language/NVC wizard!
Don't take this quiz too seriously of course: non-verbal communication is notoriously open to misinterpretation - even by experts. The key point to take from this exercise is that how you act is at least as important in an interview as what you say!

ANSWERS

1. The posture with arms and legs crossed (POSTURE B) is called a CLOSED posture. It usually signifies a defensive or negative attitude, but beware of misinterpretation - the person may just be cold. The other posture with arms and legs uncrossed (POSTURE A) is called an OPEN posture and usually suggests a more relaxed, open attitude.
Give yourself 2 points for answer A.

2. Research by Albert Mehrabian suggested that body language was the most important, followed by how you sound, with what is actually said being the least important!

Get 2 points for answer C


Researchers at Goldsmith's College found that female students who gave sidelong glances, gazed at the floor, fiddled with their hands, touched their hair, nodded their heads vigorously and kept answers to questions short were more likely to be offered jobs.
Men who faced the interviewer head-on, boasted about their success, didn't nod their heads too much and gave long answers to questions did better.
This was based on 60 students applying for jobs with leading companies. The study hoped to help interviewers to avoid unconscious discrimination due to sexual stereotypes.

3. Although all of these (except perhaps a loud voice) probably do contribute towards a good impression at interview, the three that had a statistically significant correlation were found to be eye contact, smiling, and surprisingly nodding your head! To complicate matters further, some recent research found that head nodding was seen as positive in women, but not in men, whereas too much eye contact was seen as negative in women candidates! (see panel to the right).
We find people who look directly at us more likeable and more attractive. This is especially true if they are smiling. However staring at the interviewer all the time could be perceived as hostile!
Get 2 points for any of B, D or E
4. When people copy each others posture, it is called postural echo or mirroring. e.g. in a pub, friends will often pick up their drinks at the same time. It occurs subconsciously when people have similar views, the same status, or like each other. Strangers often studiously avoid mirroring each others postures. Paraphrasing what the other person is saying to you is a verbal version of mirroring, and can show that you are listening carefully to the other person.
In research on this an actor played an interviewee and mimicked the posture of the interviewer. Interviewers showed no awareness of this mimicry but rated the interviewer more favourably considering that he thought more like they did and identified with them. However, beware of consciously mirroring interviewers to try to make them like you - most personnel managers will probably know far more about this than you do!
Get 2 points for A
According to research at Harvard Business School striking a "power pose" (an expansive posture with open limbs rather than one with crossed arms and legs) raises testosterone levels by an average of 20% and lowers cortisol (the stress hormone) by a similar amount.

5. Position B is called the "throne" position. It reinforces the interviewer's sense of control he/she can see everything that goes on in the room. Old fashioned managers often use this type of arrangement. Also the interviewee's chair is a long way from the desk increasing the formality. Position A with the desk touching the wall allows for a more informal and less dominating encounter. Sitting side on to the door allows for ease of approach. Sometimes the desk may be absent completely. Doctors and lecturers often use this arrangement. However be careful not to read too much into desk positions, the interviewer may have just borrowed the office for the interview and may not be able to influence the arrangement!
Get 2 points for answer B

6. Putting your hand up with five spread fingers is an insult gesture in Greece! Be aware that people from other cultures have different distances they stand apart, loudness of voice, gaze behaviours etc. which can easily be misinterpreted by people of a different culture.
Get 2 points for answer B

Key Points for an interview

  • Smile!
  • Be prepared to shake hands firmly, but don't break the interviewers wrist. Similarly a "wet fish" (weak) handshake will suggest a weak character.
  • Wait to be invited to sit down.
  • Try to relax - don’t sit on the edge of your chair and don't lean too far back: sit up reasonably straight and still.
  • Don't sit with your arms crossed (see question 1)
  • Keep up good eye contact with the interviewer (according to research this apparently is especially important for men) but don't eyeball them all the time!
  • Speak clearly but not too fast: a deeper calm voice suggests authority, whereas as excitable high-pitched voice suggests a nervous personality.
  • Head nodding to show agreement can help, especially for female candidates.
  • Postural echo (mirroring the interviewer's posture) can show empathy and agreement but needs to be don't very subtly or it might backfire if the interviewer notices that you are doing this!

Sunday 19 June 2011

NUMERICAL REASONING TEST

How to work out the answers
1) 83 -17 = 56 + ?
66 = 56 + ?
? = 66 - 56 =
10
2) Which company's sales were most consistent throughout the year?
Range of
Frying Tonight is minimum 1 (e.g. January) to maximum 3 (e.g. May): a range of only 2.
3) In which month did the sales of Hole in Roof and Stones' Throw differ the most?
Sales of Hole in the Roof are 2 in
July: sales of Stones' Throw are 9 that month: a difference of 7 which is the greatest difference.
4) Which month gave the largest number of sales for all the companies combined?
June: 3 + 6 + 6 + 7 + 8 = 30 sales in
June
5) What was the percentage increase in sales for Hot House between July and August?
Hot House sales in July = 5. Sales in August = 6
a) find the difference between the two numbers: 6 - 5 = 1
b) Take this difference (1) and divide by the original number: 6/5 = 0.2
c). Lastly, multiply this by 100: 0.2 x 100 =
20%
6) How far does the student walk in total?
One km from 8.00 to 8.10 and another km from 8.25 to 8.35 =
2 km total
7) How far is he from the university students' union at 8.20 am?
Students' union is at 6 km distance from home.
At 8.20 am student is at 3 km from home. Therefore he has
3 km still to travel to the union.
8) What is the average speed of the bus?
Student gets on bus at 8.15 am at 1 km from home.
Student gets of bus at 8.25 am at 5 km from home.
Therefore bus travels 4 km in 10 minutes
The bus would travel six times as far in one hour = 6 x 4 km in one hour =
24 kmph
9) What is the missing number? 56 / 7 = ? - 5
56/7 = 8
Therefore 8 = ? - 5
8 =
13 - 5
10) What is the missing number? 20 / 0.8 = ?
20 / 0.8 =
25 (NOT 16: try it on a calculator if you don't believe it. Dividing by a fraction always gives a larger number)
11) Which is the largest fraction: 3/4 7/8 4/5 7/9 7/10
3/4 = 0.75,
7/8 = 0.875, 4/5 = 0.8, 7/9 = 0.777..., 7/10 = 0.7
12) If oranges cost 5 for 75p how many can you buy for £2.70? (Assuming they can be bought singly)
5 oranges cost 75p, therefore one orange costs 75/5 = 15p
£2.70 = 270p.
Therefore amount of oranges for 270p = 270/cost of one orange = 270/15 =
18 oranges
13) A shed has a side wall of the dimensions shown. Calculate the area of the wall in square feet.
Area = area of square + area of triangle at top
Area of square = length x width = 6 x 4 = 24 square ft
Area of triangle = base x perpendicular height / 2 = 6 x (6 -4) / 2 = 6 sq ft
Total area = 24 + 6 =
30 sq feet
Or you can use the formula for the area of a trapezium.
Area = average of the length of the two different sides x length of base
= (6 + 4)/2 x 6 = 5 x 6 = 30
14) A car left Canterbury at 7.12 am and arrived in Birmingham, 180 miles distant at 10.57 am. What was its average speed in miles per hour?
Time taken = 3 hours 45m = 3.75 hours (15/4 hours if you prefer fractions).
Speed = distance / time taken = 180 / 3.75 =
48 mph
15) An aircraft flies 930 miles in 75 minutes. How many miles does it fly in 4 hours 45 minutes assuming a constant speed?
75 minutes = 75 / 60 hours = 1.25 hours (or 5/4 hours if you prefer fractions)
Speed of aircraft = 930 / 1.25 = 744 mph
4 hours 45 m = 4.75 hours (or 19/4 hours in fractions)
Therefore aircraft will fly 744 x 4.75 miles =
3534 miles
16) You get a wage increase of 4% plus an extra £5 per week. Your present wages are £250 per week. What will your new wage be?
Present wage = 250
4% of 250 = 4 x 2.5 = £10
Therefore new wage = 250 + 10 + 5 =
£265
17) What is the total income of the taxi driver for the whole year?
Average fare = 4 x 90p = £3.60
Income per week = 70 fares at £3.60 each = 70 x 3.60 = £252
Income for 46 weeks work = £252 x 46 =
£11,592
18) What is her total expenditure over the year to the nearest pound?
Car/Service/MOT/Repairs/ Insurance = £1250 p.a.
Mortgage costs = £250 per month = 250 x 12 per annum = £3000 p.a.
Other expenditure = £125 per week = £125 x 52 per annum = £6500 p.a.
Diesel fuel costs = 6p per mile.
Annual mileage = 4 miles x 70 fares per week = 280 miles per week
= 280 x 46 weeks worked each year = 12,880 miles
Therefore diesel cost = 12,880 x £0.06 = £772.8
Therefore total expenditure = £1250 + £3,000 + £6,500 + £772.8 = £11,522.8 =
£11,523 to nearest pound
19) What is her average excess of income over expenditure per month to the nearest pound?
Income p.a. = £11,592 Expenditure p.a. = £11,523 (answers to previous two questions)
Therefore excess of income over expenditure = £69 p.a. = £69 / 12 per month = £5.75 =
£6 per month to nearest pound
20) A cube has a volume of 8 cubic metres. If each side is doubled in length what will its new volume be in cubic metres?
Volume = length x width x height
8 = l x w x h but l, w and h are all equal as it is a cube
Therefore l = w = h = 2m
If each side is doubled in length l = w = h = 4m
Therefore new volume = 4 x 4 x 4 =
64 cubic metres
Or if you prefer the quicker method. If each side is doubled in length then the new volume must be 2 to the power 3 bigger = 8 x 8 =
64
21) A driver drives 8 km South then 6 km W. and 2 km S. again. She then drives 3 km E. to avoid a traffic jam before driving 6 km N. How many kilometres is she from her starting point?
Total distance driven South = 8 + 2 - 6 km = 4 km
Total Distance driven West = 6 - 3 km = 3 km
This makes a right angled triangle where the distance from her starting point is the hypotenuse.
Using Pythagoras Theorem: "In any right triangle, the area of the square whose side is the hypotenuse (is equal to the sum of the areas of the squares of the other two sides"
4 squared + 3 squared = hypotenuse squared
16 + 9 = 25 = hypotenuse squared
Therefore hypotenuse (distance from starting point) = square root of 25 =
5km
Or a simpler method is to see that the distances make a 3, 4, 5 triangle so the distance from start is 5 km
22) What was the largest number of students in any year that went on to further study?
2004 has the most students entering further study: 39% of 1500 students
39/100 x 1500 =
585 students in 2004
23) What was the decrease in the number of graduates in employment between 2002 and 2004?
Number of graduates in employment in 2002 = 1,700 x 40/100 = 680
Number of graduates in employment in 2004 = 1,500 x 37/100 = 555
Decrease = 680 - 555 =
125 graduates
24) In 2004 how many social science students were in employment after graduating?
Can't say: there is insufficient data.
25) Which month showed the largest total decrease in PC sales over the previous month?
Drop is from 3,400 + 3,800 + 2,900 in April (total 10,100) to 2,800 + 2,900 + 2,900 in
May (total 8,600), a drop of 1,500.
26) What percentage of Manufacturer 2's sales were made in April (to the nearest percent)?
Manufacturer 2's Sales are March 4,100 April 3,800 May 2,900 June 3,100 July 3,500
Total Sales = 17,400
Sales in April = 3,800
Percentage of sales in April = 3,800 / 17,400 x 100 = 21.8% =
22% rounded to nearest percent
27) If the average profit made on each PC sold by Manufacturer 3 over all 5 months was £78 what was the total profit on all sales in this period by that manufacturer?
Total sales for Manufacturer 3 = 2,800 + 2,900 + 2,900 + 3,200 + 3,300 = 15,100
Profit per PC = £78, therefore total profit = 15,100 x £78 =
£1,177,800