Problem with subqueries (1Z0-051)

Hello, first of all sorry if this post belongs here.

I am a student 1Z0-051 and I have a problem trying to understand why an exercise done my own does not work.

In the press review of Oracle for 1Z0 - 051 on page 369, there is an exercise that says:

How determine you which employees would have a manager who works for a Department based in the United Kingdom?

The example is the following (using the HR database):

Select first_name, last_name from employee

where manager_id in

(select employee_id in employees where department_id in)

(select department_id from Department where location_id in)

(select location_id from places where country_id = 'Ru')))

order by name

I tried to do it by myself and I wrote this query

Select first_name, last_name from employee

where manager_id in

(select distinct (manager_id) employees where department_id in)

(select department_id from Department where location_id in)

(select location_id from places where country_id = 'Ru')))

order by name

The difference is in line 3, can someone explain to me why does not this way?

Thank you very much!!

Kind regards.

We will try to put it in English.

First query is:
Select employees whose managers are employed in a service based in the United Kingdom.

Second query is:
Select employees whose managers are responsible for the employees in a service based in the United Kingdom.

So for employees:
Alice is at Headquarters.
Bob is in UK Finance. It is managed by Alice.
Chris is in UK Finance. It is managed by Bob.
Diana is in us logistics. It is managed by Alice.

First query selects:
No Alice. It is not managed.
No Bob. His manager is Alice, an employee's headquarters.
Chris. His manager is Bob, an employee in the UK Finance.
No Diana. Its Director is Alice, an employee's headquarters.
 
Second query selects:
No Alice. It is not managed.
Bob. His manager Alice manages Bob, an employee in the UK Finance.
Chris. His managers Bob manager Chris, an employee in the UK Finance.
Diana. His manager Alice manages Bob, an employee in the UK Finance.

Tags: Database

Similar Questions

  • 1Z0 - 051 - all the facts, learning does not have a past.

    What I'm missing or doing wrong?

    I read "Oracle Database 11g: SQL Fundamentals I: Oracle Certification Prep" by Matthew Morris and a few months made uCertifys prepkit for her, until I received more than 75% every time on practice tests with 40 mins flying over! BUT WAIT WHAT HE... I failed the exam the other day terribly! Being an online test and I have same time left more to look for anything, for I was not sure about the thought, I thought I was well prepared.

    The review was for most of the exercises with several possible answers, so when in doubt one is bad then the question is wrong. Very few quick questions like "which is not a function of the single line". As 90% where problems/exercises who needed to read the requirements and analysis of multiple SQL queries for what (did or did not) meet the requirements. I was so anxious that I had no time to work on each issue to understand the issues and to provide a real answer. Only "very probably with time I got ' responses. Basically an assumption (with multiple true/false addresses its practically unlikely to get from a guess)

    I found it didn't test "Oracle SQL" only, but your ability to problem solve quickly. So I bombed despite I know everything in the guide and I'm now not sure what to do next, as I know the content well, I just suck to solve these exercises within 2 minutes of each. (Are there copies of the latest test questions out there that people use to go I don't know! http://cache-www.coderanch.com/images/smilies/3b63d1616c5dfcf29f8a7a031aaa7cad.gif or I just suck at examinations.

    >.. are been done uCertifys prepkit for her, until I received more than 75% every time on practice tests with 40 mins flying over!

    Practical examinations again and again and again until you get a high score is not useful... it's just fool yourself into thinking that you are ready.  Practice exams are better used to assess how ready you are after you have made all other preparations.  Even in this case, the score only means something the first time or two you take the examination practice. After that, your score is not really what you know on the subject, but what do you remember the last time you answered these questions. I talk about this in the following article:

    How to effectively use the practice Tests when studying for an Oracle Certification

    > I found it didn't test "Oracle SQL" only, but your ability to problem solve quickly.

    120 minutes for 66 issues (dry 109 / question), 1Z0-051 is in fact one of the exams less limited time oracle has. One of the really bad is 1Z0-144, which is 70 questions in 90 minutes (dry 77 / question).  That said, the 1Z0-051 exam * has * to be a bit constrained time.  As a review unmanaged, if he allowed far too much time, it would be too easy to simply seek the answers to the questions in a reference book (who is cheating, BTW).

    > Review was especially exercises with several possible answers, so when in doubt one is bad then the question is wrong.

    I would say the majority of the Oracle exam questions are multiple-answer, Yes.  With these, if you get a bad part, the whole question is wrong (i.e. If you are supposed to choose three answers and you get 2 right, you do not get credit 2/3).  If the correct answer is not immediately obvious to me, so I watch each of the answers to find those who have something clearly incorrect and remove them.

    > Are there copies of the latest test questions out there that people use to pass that I'm not aware of!

    There are always people who find a way to cheat at exams.  It is a way, and people who do this are endangering their certification status and lowering of the value of the certification.

    You don't mention my guide uCertify, but no sources or other preparation.  You have experience writing SQL?  On the front of the guide on the preparation for the exam, it indicates that you should have spent queries execution time of writing, and to see the result before programming the test.  He also stated in the same section as the candidates again in SQL, you must complete the information with data from other sources and suggests the companion site.  This site Details exam 1Z0-051 page has links to articles and videos that will help you learn more about Oracle SQL - all available for free.

    I'd say the next step would be to go to the details page to review for this review and find out some (or all) of the SQL tutorial videos.  There are several different video series of different instructors.  Choose the instructor that seems to suit you best or to display several series.  Look at one of these should give you a better grounding in SQL.  You can read some articles available on the page.  Installation Oracle XE and practicing writing SQL statements is also a very good way to cement the information contained in your brain.  At this time, read through the guide.  It focuses on the topics specific to the review, but if you know little about SQL, there is no way to put information in context.  Details for 1Z0 - 051 page is here.

    Oracle Certification Preparation: Details of the examination and preparation for 1Z0 - 051 resources

    You might also benefit from reading this article:

    Oracle Certification preparation time: I failed my exam Certification Oracle. What should I do now?

  • Advisor-1Z0 - 051

    Hi all

    I took 1Z0-051 last night after several months of study and has a 3 percentage points. Basically, I ran out of time. I knew how to answer most of the questions, but the motions were simply too much time for me.  Any advise? I wasn't expecting 2 hours of extreme concentration, with most of the questions to be with several narrow answers queries.  I don't know yet how to study or what I did differently.  Is there a good strategy I don't see?   Basically, I ran out of time and had to score the last 10 questions randomly.  I mean common Oracle, which is wisdom here?

    Time management is always a factor in the certification exams.  1Z0-051 is not the worst (so far in my experience, the title goes to 1Z0 - 144).  However, because it is a review unproctored, Oracle University had to ensure that the period was quite short so that it wouldn't be feasible for someone searching for the answer to each question.  John's suggestion is reasonable, although I always recommend that when 'jump' the questions you have always put in your best guess, mark it and then move on to the next.  This way if you don't have the time to come back, there is at least a chance that you got it is correct.  I have not read the technical article by John, but here is one that I created a few months ago who was published in GoCertify.  The latest three tips are most relevant here.

    Oracle certification: 10 tips for any exam. GoCertify

    However, your note, you indicate that most of the questions took too long.  Unfortunately, it's just a matter of familiarity with SQL.  Someone who can read SQL, but don't have a lot of experience with it may take three minutes answering a given question, while a person who has worked with Oracle SQL for years he would complete in one.  There is no cure for this except practicing writing queries until you are more comfortable with it.  You can also consult the research resources that I have collected on my site for this review.    They are all safe certification and most are free.  In particular, it has links to a number of videos on YouTube of Oracle SQL intro courses.

    Oracle Certification Preparation: Details of the examination and preparation for 1Z0 - 051 resources

    A suggestion I can do in trying to choose the correct answer from a list of similar SQL statements won't get one that fits the departure but rather identify those clearly wrong.  Usually there will be at least one or two with an obvious flaw - the wrong number or the order of the columns in the SELECT clause - an invalid comparison in the WHERE clause, etc.  I'll look through them and quickly eliminate these review before those remaining

  • Could I take 1Z0-051 and 1Z0-047 together?

    Hi, I currently intend to take an Oracle PL/SQL Developer Certified Associate. Initially, I intend to take the path of 1Z0 - 047 + 1Z0-144, that leads to this certification, because the exam 1Z0-047 points also to an another cert (cert Oracle SQL Expert). So if I take this path, I'd end up with two certifications (cert Expert Oracle SQL and PL/SQL Developer Certified Associate)

    However, people keep telling me that 1Z0-047 is very hard, saying that 1Z0 - 051 is a lot easier if I want to guarantee a PL/SQL Developer Certified Associate.

    So, is it possible that I take all three exams (1Z0-047, 1Z0-051 and 1Z0-144)? I think that takes 1Z0 - 051 as a kind of 'practice' because it is an online exam and the scope of the review seems easy for me. I also have some budgets for me so I don't mind spend a little more money to the Oracle exams.

    I wonder if both of them (051, 047) are mutually exclusive in the policy review or something.

    So, is it possible that I take all three exams (1Z0-047, 1Z0-051 and 1Z0-144)?

    Yes, you can take both 1Z0-051 and 1Z0-047. In fact, I highly recommend taking 1Z0-051 before 1Z0-047. You heard correctly, 047 is a much more difficult test and requires a much higher level of experience or SQL knowledge. If you look at the subjects of study for the two trials, you will see that 1Z0 - 047 includes essentially all the 1Z0-051 exam topics and has an another 30 more topics. Study for 1Z0 - 051 is, in itself, the scrutiny of experts preparation. Discuss the two reviews in an article here:

    http://www.gocertify.com/articles/Oracle-SQL-certification-1Z0-051-or-1Z0-047.html

  • After 1Z0-051

    Hi all

    Last Saturday, I finished my OCA first exam 1Z0-051 (fundamentals of 11g) with 94%.

    Now, I'm not what exam do I fill my OCA certification.

    Please suggest that examination for DBA and developer codes too.

    Please help me on this.


    Concerning
    Thelak

    Last Saturday, I finished my OCA first exam 1Z0-051 (fundamentals of 11g) with 94%.

    Now, I'm not what exam do I fill my OCA certification.

    Please suggest that examination for DBA and developer codes too.

    Scores is your staff, even if you just pass you are eligible to order other tests.

    As Hoek mentioned, there is a division dedicated to issues of certification and details, please visit community Certification
    & close the debate here.

    Sound for all

  • 1Z0-051: survey objective SQL Fundamentals

    Hello

    first of all, I would like if this is the right track / forum to ask. If this isn't the case, please accept my apologies in advance.

    I am preparing for the 1z0-051 exam Oracle Database 11 g SQL Fundamentals 1. My main refrence is:
    OCA Oracle Database 11 g SQL Fundamentals I Exam Guide (exam 1Z0 - 051) review complete preparation-John Watson and Eric Ramklass, Oracle Press.

    I could find in the book of reference for the purpose of assistance of the DDL statements to create and manage Tables:
    Describe the operation of schema objects.

    Any help with this goal, please?

    Thank you

    The hell of the DAD, I just answered your question in the other topic you opened. The information provided in the link gave you Markus Waldorf are too detailed. You don't need to know about the CLUSTER SIZE, EXTERNAL PROCEDURES, etc. etc.

    I passed the exam, not so long ago, and the book is enough (with 5 years using Oracle almost everyday in my case).

    See you soon,.

  • Passed 1Z0 - 051 - is the final score?

    Hi all

    Chasing "Oracle PL/SQL Developer Certified Associate' certification. Just finished online ' 1Z0-051-Oracle Database 11g: SQL Fundamentals I '. After review, I get a summary containing for example "Score from 60% ' and my current score, which is" Pass (67.3%) "" ».

    According to what can be seen on the official Oracle site describing "Oracle Database 11 g: SQL Fundamentals I ', 'Note subject to changes of passage'.» How does it relate to me? If I had information after the confirmation of the review that I spent, I thought I really spent, or rather is located and must wait for some kind of additional confirmation, as the "Note of passage subject to change"?

    Just a little confusion.

    My interpretation:

    'They' say simply that the official level pass could change in the future. (In other words, they are sayig the website could be the problem.)

    If Oracle decides to change the level of passage, in the future people have need to reach the new level of pass to pass. Passes and existing scores are grandfathered.

    However, you have received an official piece of paper that says you spend. Save it for your files. You can be comfortable that the score is final and that you lack.

  • problems with, phone, 6, Bluetooth kit, Nissan, after update, for, Rios, 1.0.2

    After the update to ios 10.0.2 - trying to use bluetooth to call my vehicle, it says: "this article is not in your phone book." How can I solve this problem?

    Greetings, joybelino1!

    Thank you for joining the communities Support from Apple! I can't wait to see that you are having problems with your Bluetooth in your car! The good news is that Apple has a great article that will help you with measures to try to resolve the problem. Read this article to gethelp to connect your iPhone, iPad, or iPod touch with your car radio. Even though he talks about problems with the connection, it also has the steps for other questions you may have once connected.

    If you use Bluetooth

    1. Consult the user manual of your car stereo to get the procedure to a Bluetooth device.
    2. On your iOS device, drag up to open Control Center, then press ontwice to turn on Bluetooth and turn it back on.
    3. Restart your iOS device.
    4. On your iOS device, Cancel the twinning of your car radio. On the screen of your car désapparier your iOS device and any other device. Restart your car and your iOS device, then pair and connect again.
    5. Update your iOS device.
    6. Install the updates to the firmware of your car radio.
    7. If you still not connect, contact Apple technical support.

    Have a great day!

  • Anyone having problems with WiFi connectivity after upgrade to Sierra?

    I was wondering if anyone else knows issues with WiFi connectivity since the upgrade to Sierra 10.12? I have not had any problems with connectivity WiFi previously on El Capitan. Now I have regular randomly loose connectivity. My internet is cable and when it is connected I have a 100% connection. My details of iMac and I have used only 10% of my storage.

    No problem with my iphone 6.

    Hello AspDesigns,

    I understand that, since the upgrade to Mac OS Sierra, your Mac seems to have trouble staying connected to Wi - Fi. Fortunately the diagnosis built-in wireless can help identify the source of so much trouble.

    Search for Wi - Fi using your Mac problems

    See you soon!

  • Problems with mail after switching to macOS Sierra

    Hey all

    After having recently upgraded to macOS Sierra, I am unable to read my mail.

    I get the following error every time I check on "Get Mail".

    There may be a problem with the mail server or the network. Check the account settings "*" or try again.

    The server returned the error: Mail could not connect to the server 'pop1.tribcsp.com' using SSL on the default ports. Verify that this server supports SSL and that your account settings are correct.

    What does this error message mean and how can I solve this problem.

    Thank you

    Hi Michael,

    I see your message that you get an error in the mail indicating that there is a problem with the mail server or the network.  To help get this problem resolved, I suggest that you follow the steps below:

    If mail refers to a problem with the mail server, or the network

    Mail will say that it is impossible to connect due to a problem with the mail server or the network. For example, the message may refer to a connection that has expired, or too many simultaneous connections:

    If you are connected to the Internet, but the connection has expired, your email provider might be affected by a discontinuance of service. Contact them or see their status Web page to ensure that their e-mail service is online. Examples of status pages:

    If the message indicates the number of simultaneous connections, too many of your devices is check your e-mail account at the same time. Quit Mail on one or more of your other devices.

    If you are still unable to send or receive e-mails

    1. Make sure that you have installed latest version of the Mac software updates, especially if the problem occurred immediately after the installation of a previous update.
    2. In OS X El Capitan or later version, you can see a status icon and the short error message in the upper right of the Mail window, under the search box. The message may indicate 'Network offline' or 'Connection failed', for example. Click the message to see more details on the issue.
    3. Check your connection to the Mail connection doctor. It might be able to say more on the issue.

    If you cannot send or receive e-mail on your Mac.

    Take care.

  • iMac 27 "mid-2011 - Intermittent problem with CPU fan running at full speed and sleep mode.

    Hello!

    My iMac 27 "has an intermittent problem with the CPU fan runs at full speed. Sometimes it happens at the time when I start it, sometimes only in my session, and sometimes only after a certain time. So does seem to be a problem of "heating".

    Second issue is with the mode 'sleep'. It may occur also at any time, at the start of the iMac, session, or after a certain time. But once he starts to go in mode 'sleep', when I wake up, it goes right back in mode after a few seconds and that it will continue indefinitely until I restart the computer.

    What could be?

    Please help me!

    4ntoine

    Here is my model of iMac:

    iMac 27 "mid-2011 model 12.2

    Intel Core i7 3.4 GHz

    AMD Radeon HD 6970M 1024 MB

    OS X El Capitan 10.11.6
    SMC 1.72f2

    Boot ROM IM121.0047.B23

    reset the SMC

    Reset the management system (SCM) controller on your Mac - Apple Support

  • problem with playing the clash of clans

    I'm having some problems while playing the clash of clans on my 2 mini ipad screen does not seem to meet sometimes as if it was some sort of delay so I have to tap several times in order to use a filter or throw the troops on the battlefield.

    Hi Trinitygr,

    Thanks for posting in the Community Support from Apple! I understand that you are having problems with your iPad screen while playing a game. I like to play games on my iPad and I don't see how this could be a nuisance. I'm happy to offer assistance.

    Are you only had this problem when using the app clash of Clans, or does it happen in all applications? I recommend to start by following the steps described in this article:
    If an application you have installed unexpectedly closes, unresponsive, or does not open

    Take care!

  • I'm having problems with an outdated Apple ID

    I have problems with updating Apps etc in my Apple account because he always asked an obsolete in sign.  How can I change this?

    Hello

    Go down to itunes apple ID Delete page homepage all ID and then add it back back.

    See you soon

    Brian

  • Anyone having problems with the new iPhone LTE connection 7 on Verizon?

    I am now on my iPhone second 7 with Verizon. I had four phones for me and my family. I have now had issues where I have no signal in the same areas where my signal allows to be strong. I can't solve the problem with the activation/deactivation of the airplane and then mode again in normal mode. My phone will rest with no signal for 5 minutes, then going to LTE with three bars. I also had the problem where I had only 1 x signal, while my son standing right next to me has LTE. And he had the same questions, where I'm on LTE and it gets no signal. I use to have LTE where I live and work all the time, now it's spotty at best. Apple has replaced me and my sons iPhones but not luck. Still do. Any ideas or an any other suffering?

    (1) go to settings/cell phone/cellular data Options/enable LTE and select ONLY the DATA. This seems to solve the problem (as a temporary solution) for most of the people affected by this problem. The bad part is your request might not be as clear (since they cannot use the highest LTE signals) and you can make calls and data at the same time. But it does not solve the issue.

    (2) there are rumors (but you didn't hear that from me that we only are not supposed to discuss beta software program Apple in this forum) that the new version of Apple Beta for iOS (which also includes an update of the software carrier Verizon to 26.0) seems to solve this problem. So, there's a light at the end of the tunnel.

  • Problem with some fonts of symbols after the installation of the Sierra

    Hello

    I have recently upgraded the OS on my iMac late 2012 for Sierra, since doing so, I noticed a problem with several fonts.

    All symbolic symbols Apple to Wingdings fonts not correctly displayed in the font book. Apple symbols looks like a standard wheelbase of san, and other symbolic fonts just show as question marks '?' where the images should be.

    In text editing, that I can't even see the symbolic fonts like Zapf Dingbats and Wingdings in the selector. However, they all work well in Adobe Illustrator (CS5) and Microsoft Word 2011. Apple symbols still looks like a standard font.

    I already tried the following:

    1. check the fonts in font book

    2 fix the duplicates in the font book

    3. using the "Restore Standard fonts" option in the font book

    4 deleting a file in the folder Preferences plist Fonts

    5 deleted the cache of police and the database

    I'm out of ideas. Has anyone else had the same problem found a fix?

    Kind regards

    Greville

    I'm just to add that I used the recovery partition to do a clean install of Sierra on a hard drive external and then booted into it to see if it had the same problem.

    And he does. Wingdings and other photo fonts appear as '?' in boxes where the letters must be in the font book.

    So this seems like a problem with the way Sierra displays these fonts, not with the font files themselves.

Maybe you are looking for

  • Is it possible to watch channel 5 on a MacBook pro?

    Is it possible to watch channel 5 on a MacBook pro?

  • Logitech C910, video, Using mic causes audio broken

    My configuration: latest version of Skype for Mac, MacBook Pro running Lion, webcam Logitech C910. My problem: The value of Skype to use the cam of Logitech microphoneStart the group video callOn my end, I hear incohérant choppy, delayed, audio. Part

  • HP Compaq 15-s103TU: realtek

    I guess I have an OS 32-bit but not sure. Anyway, I can't connect to the internet. Troubleshooting told me that the Realtek RTL8723BE 802.11b/g/n wifi adapter has driver or hardware related problems. There is no previous version of the driver that I

  • HP 15-g021ng Notebook - PC (J1S32EA) and Driver video card

    Dear community, I still need help with the subject... documentation says what laptop AMD Radeon R3-Grafikkarte has... I tried autodetect of AMD... This tool finds best driver for me... i installed this driver... but I still defauld pilot Ms... What I

  • VC 90 CRT error code

    Help me I have purchase a new digital camera during the installation, I get the VC 90 Crt error code... I don't know now how I can install... What should I do to remedy the situation... I am user P regular not a prodigy... Can someone tell me how to