GeekInterview.com
Submitted Questions

Difference between m_mkfs and m_touch

Asked By: vital_parlsey | Asked On: Jul 6th, 2012

What is the difference between m_mkfs and m_touch. both create a mfs how do they differ ? also what is the syntax for creating mfs using m_touch

Answered by: balu on: Oct 6th, 2012

m_mkfs: to create a multifie system
m_touch: to create a empty file system

Answered by: RAM on: Aug 17th, 2012

M_mkfs will creates a multifile system
M_touch will creates empty multifile

3 way join component

Asked By: vital_parlsey | Asked On: Mar 3rd, 2012

Hi, i have 3 files each having 2 cols e.G file1 empid deptid 1 100 2 200 3 200 4 100 5 300 file2 empid salary 1 10 2 20 3 30 4 40 5 ...

Answered by: chandrasekhar on: May 10th, 2012

1.Perform inner join for both file1 & file2
2.perform sort on dept id then do Roll up
3.perform inner join for roll up o/p and file3
4.finally you will get required result

3 way join

Asked By: vital_parlsey | Asked On: Mar 1st, 2012

Hi, i have 3 files each having 2 cols e.G file1 empid deptid 1 100 2 200 3 200 4 100 5 300 file2 empid salary 1 10 2 20 3 30 4 40 5 ...

Answered by: Mark Haynes on: Mar 2nd, 2012

I believe what you are looking for is a query like this:

select f3.deptname dept_name, sum(isnull(f2.salary,0)) amt_spent_each_dept
from file3 f3 left join file1 f1 on (f3.deptid = f1.deptid)
left join file2 f2 on (f1.empid = f2.empid)
group by f3.deptname
order by f3.deptname

3 way join with different column names.

Asked By: vital_parlsey | Asked On: Mar 1st, 2012

Hi, i have 3 files each having 2 cols e.G file1 empid deptid 1 100 2 200 3 200 4 100 5 300 file2 empid salary 1 10 2 20 3 30 4 40 5 ...

Answered by: PLMS on: Mar 29th, 2013

Step 1: File1 - left outer Join {Key- empid} with -File2 Step 2: The above output flow should be sort{PBKS-if multifile} based on key empid Step 3: The step 2s o/p flow to be left outer joi...

Answered by: Malini on: Apr 3rd, 2012

Code
  1.   SELECT C.DEPTNAME,sum(B.SALARY) FROM FILE1 A ,FILE2 B ,FILE3 C
  2.   WHERE A.EMPLID=B.EMPLID AND A.DEPTID=C.DEPTID
  3.   GROUP BY C.DEPTNAME

Interview Question

 Ask Interview Question?

 

Career Counselling

 Have Career Question?

 Ask Chandra

 Ask Only Career questions.

Follow us: