join _ sql join queries interview questions and answers pdf set-6 ~ interview questions pdf

9
2/22/2015 JOIN : SQL JOIN QUERIES INTERVIEW QUESTIONS AND ANSWERS PDF SET-6 ~ INTERVIEW QUESTIONS PDF http://www.interviewquestionspdf.com/2014/07/join-sql-join-queries-interview.html 1/9 INTERVIEW QUESTIONS PDF JOIN : SQL JOIN QUERIES INTERVIEW QUESTIONS AND ANSWERS PDF SET-6 HOME FREE PDF MS SQL SERVER JOINS RELATED INTERVIEW QUERIES Here we come with latest/new sql server joins queries, as you know joins related queries/questions are most frequently asked in any database related interview to puzzle developers. So this set of interview question contains basic joins related interview question which can be asked in any company interview, And Company like TCS/HCL/Infosys/Nagarro mostly asked following type of queries. So before attend interview be prepare for it. This set of question is for experienced developers(2-3 years). Upcoming set will contain more complex joins related interview questions which you will face time. I promise you will be surprise to see next set of join queries, because you will face it first time. At last you will be able to download all query in pdf format. So start from basic. 0 Share Free Oracle Training Videos. Subscribe to preview co via Oracle Learning Streams youtube.com/oraclelearningstream

Upload: ravi90

Post on 17-Dec-2015

401 views

Category:

Documents


22 download

DESCRIPTION

fvgbh

TRANSCRIPT

  • 2/22/2015 JOIN : SQL JOIN QUERIES INTERVIEW QUESTIONS AND ANSWERS PDF SET-6 ~ INTERVIEW QUESTIONS PDF

    http://www.interviewquestionspdf.com/2014/07/join-sql-join-queries-interview.html 1/9

    INTERVIEWQUESTIONS

    PDF

    JOIN : SQL JOIN QUERIES INTERVIEWQUESTIONS AND ANSWERS PDF SET-6

    HOME FREE PDF

    MS SQL SERVER JOINS RELATED INTERVIEWQUERIES

    Here we come with latest/new sql server joinsqueries, as you know joins related queries/questionsare most frequently asked in any database related

    interview to puzzle developers. So this set of interviewquestion contains basic joins related interview question whichcan be asked in any company interview, And Company likeTCS/HCL/Infosys/Nagarro mostly asked following type ofqueries. So before attend interview be prepare for it. This setof question is for experienced developers(2-3 years).Upcoming set will contain more complex joins related interviewquestions which you will face time.I promise you will be surprise to see next set of join queries,because you will face it first time.At last you will be able to download all query in pdf format. Sostart from basic.

    0

    Share

    Free OracleTraining

    Videos. Subscribe to preview coursesvia Oracle Learning Streams

    youtube.com/oraclelearningstream

  • 2/22/2015 JOIN : SQL JOIN QUERIES INTERVIEW QUESTIONS AND ANSWERS PDF SET-6 ~ INTERVIEW QUESTIONS PDF

    http://www.interviewquestionspdf.com/2014/07/join-sql-join-queries-interview.html 2/9

    ***********************SQL JOINS RELATED INTERVIEWQUERIES***********************

    --51. Get employee name, project name order by firstname from"EmployeeDetail" and "ProjectDetail" for those employee which haveassigned project already.--ANS:

    SELECT FirstName,ProjectName FROM [EmployeeDetail] A INNER JOIN[ProjectDetail] BON A.EmployeeID = B.EmployeeDetailID ORDER BY FirstName

    --52. Get employee name, project name order by firstname from"EmployeeDetail" and "ProjectDetail" for all employee even they havenot assigned project.--ANS:SELECT FirstName,ProjectName FROM [EmployeeDetail] A LEFT OUTERJOIN [ProjectDetail] BON A.EmployeeID = B.EmployeeDetailID ORDER BY FirstName

    --53(35.1) Get employee name, project name order by firstname from"EmployeeDetail" and "ProjectDetail" for all employee if project is notassigned then display "-No Project Assigned".--ANS:SELECT FirstName, ISNULL(ProjectName,'-No Project Assigned') FROM[EmployeeDetail] A LEFT OUTER JOIN [ProjectDetail] BON A.EmployeeID = B.EmployeeDetailID ORDER BY FirstName

    --54. Get all project name even they have not matching anyemployeeid, in left table, order by firstname from "EmployeeDetail" and"ProjectDetail".

  • 2/22/2015 JOIN : SQL JOIN QUERIES INTERVIEW QUESTIONS AND ANSWERS PDF SET-6 ~ INTERVIEW QUESTIONS PDF

    http://www.interviewquestionspdf.com/2014/07/join-sql-join-queries-interview.html 3/9

    --ANS:SELECT FirstName,ProjectName FROM [EmployeeDetail] A RIGHTOUTER JOIN [ProjectDetail] BON A.EmployeeID = B.EmployeeDetailID ORDER BY FirstName

    --55. Get complete record(employeename, project name) from bothtables([EmployeeDetail],[ProjectDetail]), if no match found in any tablethen show NULL.--ANS:SELECT FirstName,ProjectName FROM [EmployeeDetail] A FULL OUTERJOIN [ProjectDetail] BON A.EmployeeID = B.EmployeeDetailID ORDER BY FirstName

    --56. Write a query to find out the employeename who has not assignedany project, and display "-No Project Assigned"( tables :-[EmployeeDetail],[ProjectDetail]).--ANS:SELECT FirstName, ISNULL(ProjectName,'-No Project Assigned') AS[ProjectName] FROM [EmployeeDetail] A LEFT OUTER JOIN[ProjectDetail] BON A.EmployeeID = B.EmployeeDetailIDWHERE ProjectName IS NULL

    --57. Write a query to find out the project name which is not assigned toany employee( tables :- [EmployeeDetail],[ProjectDetail]).--ANS:SELECT ProjectName FROM [EmployeeDetail] A RIGHT OUTER JOIN[ProjectDetail] BON A.EmployeeID = B.EmployeeDetailIDWHERE FirstName IS NULL

    --58. Write down the query to fetch EmployeeName & Project who hasassign more than one project.--ANS:Select EmployeeID, FirstName, ProjectName from [EmployeeDetail] EINNER JOIN [ProjectDetail] PON E.EmployeeID = P.EmployeeDetailIDWHERE EmployeeID IN (SELECT EmployeeDetailID FROM [ProjectDetail]GROUP BY EmployeeDetailID HAVING COUNT(*) >1 )

  • 2/22/2015 JOIN : SQL JOIN QUERIES INTERVIEW QUESTIONS AND ANSWERS PDF SET-6 ~ INTERVIEW QUESTIONS PDF

    http://www.interviewquestionspdf.com/2014/07/join-sql-join-queries-interview.html 4/9

    Related Posts:

    COMPLEX JOINS : SQL SERVER JOINSQUERIES INTERVIEW QUESTIONS ANDANSWERS EXAMPLES FOR EXPERIENCED SET-7

    SET-7 COMPLEX JOINS : MS SQL SERVER JOINS QUERIES INTERVIEW QUESTIONSAND ANSWERS FOR EXPERIENCED WITH EXAMPLES(MORE THAN 3 YEARS) This setcon Read More

    SELECT QUERIES: Small Tricky SQL SERVERQueries Interview Questions and Answers SET-9SET-9 Objective Type :Small Tricky SQL SERVER QueriesInterview Questions and Answers for experienced and fresher Hey

    Share This: Facebook Twitter Google+ Stumble Digg

    --59. Write down the query to fetch ProjectName on which more thanone employee are working along with EmployeeName.--ANS:Select FirstName, ProjectName from [EmployeeDetail] E INNER JOIN[ProjectDetail] PON E.EmployeeID = P.EmployeeDetailID

    Click on the following link for NEXT SET OF QUESTIONS:CLICK HERE FOR NEST SET (MORE THAN 100 QUERIES)Sponsored Ads

    18:45 INTERVIEW QUESTIONS, SQL INTERVIEW QUERY, SQL SERVER 3 COMMENTS

    Question and Answers Answers Project

    0

    Share

    Recommend this on Google

  • 2/22/2015 JOIN : SQL JOIN QUERIES INTERVIEW QUESTIONS AND ANSWERS PDF SET-6 ~ INTERVIEW QUESTIONS PDF

    http://www.interviewquestionspdf.com/2014/07/join-sql-join-queries-interview.html 5/9

    Newer Post Older Post

    here I come with tricky sql Read More

    GROUP BY : SQL INTERVIEW QUERIESQUESTIONS AND ANSWERS WITH EXAMPLEFOR EXPERIENCED SET-5SQL GROUP BY & HAVING INTERVIEW QUERIES This is 5th postrelated to sql interview queries with examples. In this post we will

    discuss most importent Read More

    DDL : MS SQL SERVER QUERIES INTERVIEWQUESTIONS FOR EXPERIENCED DEVELOPERSET-8DDL RELATED SQL SERVER INTERVIEW QUERIES This set containsmost frequently asked ddl related interview queries, It contains

    query related to Identi Read More

    JOIN : SQL JOIN QUERIES INTERVIEWQUESTIONS AND ANSWERS PDF SET-6MS SQL SERVER JOINS RELATED INTERVIEW QUERIES Here wecome with latest/new sql server joins queries, as you know joinsrela Read More

    Home

    3 comments:

    Naresh Sharma 16 September 2014 at05:32

    The query is wrong, the corrected one is:

    select P.ProjectName, E.FName from ProjectDetails Pinner join EmployeeDetails Eon p.EmployeId = E.Idwhere P.ProjectName in(selectProjectName from ProjectDetails group byProjectName having COUNT(1)>1)

    Reply

    Vikas 16 September 2014 at 05:55

    how it is wrong? U have done it on thebases of project name, I have done it on the bases of employed,main thing is count so here wherecondition can differ.

    Reply

    anzilkhan 16 January 2015 at 06:54

    Naresh was mentioning your last query.Its wrong. Compare it with your firstquery, both are same. Please correct.

    Reply

  • 2/22/2015 JOIN : SQL JOIN QUERIES INTERVIEW QUESTIONS AND ANSWERS PDF SET-6 ~ INTERVIEW QUESTIONS PDF

    http://www.interviewquestionspdf.com/2014/07/join-sql-join-queries-interview.html 6/9

    Enter your comment...

    Comment as: Google Account

    Publish Preview

    GoDaddy Rs59 Hosting

    Reliable & Secure-Free 24/7 SupportFree Phone Support, Setup & More

    in.godaddy.com

    Search SEARCH

    SQL Queries Windows SQL Server Employee Database

    Find us on Facebook

    Interviewquestionspdf.com

    40 people like Interviewquestionspdf.com.

    Facebook social plugin

    Like

    WHAT IS AN INTERVIEW? :)

    MUST READ

    Popular Posts

  • 2/22/2015 JOIN : SQL JOIN QUERIES INTERVIEW QUESTIONS AND ANSWERS PDF SET-6 ~ INTERVIEW QUESTIONS PDF

    http://www.interviewquestionspdf.com/2014/07/join-sql-join-queries-interview.html 7/9

    CHETAN BHAGAT BOOK/NOVEL HALFGIRLFRIEND FREE DOWNLOAD PDFHINDI/GUJARATI

    FREE DOWNLOAD HALF GIRLFRIEND CHETANBHAGAT NEW BOOK/NOVEL 2014 PDF

    CHETAN BHAGAT'S HALF GIRLFRIEND HINDIONLINE READ EBOOK PDF

    MS SQL QUERIES INTERVIEW QUESTIONS ANSWERSEXAMPLES 4 FRESHER AND EXPERIENCED PDF

    SQL SERVER QUERY INTERVIEW QUESTIONS -ANSWERS WITH EXAMPLE FOR FRESHER : SET-1SOLUTION

    COMPLEX JOINS : SQL SERVER JOINS QUERIESINTERVIEW QUESTIONS AND ANSWERSEXAMPLES FOR EXPERIENCED SET-7

    CHETAN BHAGAT HALF GIRLFRIEND FREEDOWNLOAD +FLIPKART +PDF

    Your Dreams are Mine Now PDF FREEDOWNLOAD? NOW GET HARD COPY FREE!! YES!!

    ASP.NET MVC INTERVIEW QUESTION PDF BOOKFREE BY Shailendra Chauhan

    Follow us on Facebook

    Blog links

    Powered by Blogger.

    2015 (48)

    Blog Archive

  • 2/22/2015 JOIN : SQL JOIN QUERIES INTERVIEW QUESTIONS AND ANSWERS PDF SET-6 ~ INTERVIEW QUESTIONS PDF

    http://www.interviewquestionspdf.com/2014/07/join-sql-join-queries-interview.html 8/9

    2014 (138)

    December (10)

    November (9)

    October (5)

    September (38)

    August (11)

    July (19)

    Big Data FREE webinar on career opportunities in B...

    10000startups.com google initiatives India

    CWG 2014 RESULT APPS ANDROID | ITUNES |WINDOWS

    GLASGOW CWG 2014 MEDAL TALLY | HARYANA &PUNJAB

    HARYANA AND PUNJAB AT CWG 2014 GLASGOW

    Schedule of Indian players at the CWG Glasgow 2014...

    FREE PDF DOWNLOAD : ANKIT FADIA SOCIAL 50WAYS TO ...

    SELECT QUERIES: Small Tricky SQL SERVER QueriesIn...

    MS SQL QUERIES INTERVIEW QUESTIONS ANSWERSEXAMPLE...

    DDL : MS SQL SERVER QUERIES INTERVIEWQUESTIONS FO...

    COMPLEX JOINS : SQL SERVER JOINS QUERIESINTERVIEW...

    JOIN : SQL JOIN QUERIES INTERVIEW QUESTIONSAND AN...

    Free Download PDF: ASP.Net, C#.Net, ADO.Net, MS SQ...

    GROUP BY : SQL INTERVIEW QUERIES QUESTIONSAND ANS...

    SALARY : SQL INTERVIEW QUERIES EXAMPLES FORFRESHE...

    DATETIME : SQL SERVER QUERIES INTERVIEW FOREXPER...

    SQL SERVER INTERVIEW QUERY WITH EXAMPLE 4FRESHER ...

  • 2/22/2015 JOIN : SQL JOIN QUERIES INTERVIEW QUESTIONS AND ANSWERS PDF SET-6 ~ INTERVIEW QUESTIONS PDF

    http://www.interviewquestionspdf.com/2014/07/join-sql-join-queries-interview.html 9/9

    Copyright 2015 INTERVIEW QUESTIONS PDFDistributed By My Blogger Themes | Blogger Theme By PremiumBloggerTemplates

    SQL SERVER QUERY INTERVIEW QUESTIONS -ANSWERS WIT...

    Import Data from Multiple Excel Files\Folders usin...

    June (7)

    May (19)

    April (19)

    February (1)

    Enter your email address:

    SUBSCRIBE

    Delivered by FeedBurner

    Get FREE EBOOK in UR mail-box

    Live Traffic Feed

    Real-time view Get Feedjit

    A visitor from Toronto, Canada viewed MSSQL QUERIES INTERVIEWQUESTIONS ANSWE... 14 secs agoA visitor from Herndon, United States