How to join tables and get ppl not in the list of the other table
Hi, I have 2 tables
Table (girlscoutid, quarter, point)
Table b (girlscoutid, fname lname)
I want to get the names of ppl who didn't sell any point/s for Q4
girlscoutid | agenda | quarter |
---|---|---|
7771 | drinks | 4QS |
9000 | Tickets | 4QW |
7771 | Cookies | 2QS |
5085 | books | 3QF |
3010 | Tickets | 3QW |
5085 | Cookies | 1QF |
lscoutid | fname | lname |
---|---|---|
7771 | Jenn | Richochet |
9000 | Laura | Wilkins |
5085 | Sally | Mae |
3010 | Dora | McKenzie |
That's what I have, however, I get duplicates and also 7771 appears on the list even if she sold something on the 4th quarter. Any suggestions?
SELECT fname, lname, a.girlscoutid
Of a, b
WHERE a.girlscoutid = b.girlscoutid
AND the term NOT AS "4Q_";
Hello
So, all the information that you want to see figure in table b, but if you want to see it depends on the table has.
This looks like a job for a semi Join. Here's a way to do it:
SELECT b.fname
b.lname
b.girlscoutid
B
LEFT OUTER JOIN has IT a.girlscoutid = b.girlscoutid
AND a.quarter NOT AS "4Q_" - or a.TERM, if it is the column
WHERE a.girscoutid IS NULL
;
What you posted was an INNER join, where the rows of each table are included in the only game that if they have a corresponding row in the other table.
An OUTER join includes all the rows in a table (table b in this case) if they have a match in the other table. If a line of b has no corresponding row in a, then all the columns that are supposed to come from table will be NULL in the result set. Given that the join condition includes = b.girlscoutid a.girlscoutid, this means that the only way to a.girlscoutid can be NULL in the result set is if the b line is included although it has no corresponding line one, which are exactly the lines that we want to display. (You can try to run the query above with the WHERE clause, deleted, just to see how it works.)
Alternatively, you can get the desired results by using a subquery NOT EXISTS, a NOT IN subquery or analytical functions. The semi join, supra, is probably the most effective solution.
Tags: Database
Similar Questions
-
For the power level icon is missing from my taskbar. How do I find and get it again showing the taskbar? I've tried the suggestions help and read the FAQ, but in vain.
Hi Dee Gilles,
Welcome to the Microsoft community. According to the description, power icon is missing from the taskbar.
· Did you do changes on the computer before the show?
I'll help you with this problem. I suggest you follow these methods.
Method 1: Follow the steps in the article.
Method 2: Scan the System File Checker (SFC) to repair corrupted files.
I hope this helps. Let us know if you need help with Windows related issues. We will be happy to help you.
-
How can I copy and paste iCloud Notes on the site to iCloud for Word on Windows?
I looked at the instructions on Apple's site on how to copy / paste of Notes iCloud in document programs, but I had no success. When I right click and drag to select what I want to copy, and then right-click, there is no option to 'Copy' (there are options to 'Copy image' and 'Save image', which do not translate in a Word document). I would like to consolidate some of the Notes I will be no more editing in the document files and you'd be acknowledging the possibility of a solution to this problem I encounter.
The following works for me: select the text, and then use the Ctrl-C key combination (or the copy of the browsers Edit menu command). Then paste into Word.
-
My Vista system trying to download the updates, and it does not complete the download. It is up to "Windowsupdate_00000646" and "windowsupdate_dt000" How do I clear this code to receive these updates?
They are only updated office or all updates?
For Office updates, usually to pick up the item at the: http://www.microsoft.com/downloads/en/default.aspx
then manually download and install the same.
If all updates, perhaps consider the following general tips-
Option: File of Windows Update agent wups2.dll is incorrectly registered and the registry associated with the Wups2.dll file files are missing.
Method 1: Save the Windows Update files
1. Click Start and type notepad in the box start the search.
2. click on Notepad in the list programs.
3. copy the following commands, and then paste them into the opened Notepad window:
REGSVR32 WUPS2. DLL/S
REGSVR32 STINKS. DLL/S
REGSVR32 WUAUENG. DLL/S
REGSVR32 WUAPI. DLL/S
REGSVR32 WUCLTUX. DLL/S
REGSVR32 WUWEBV. DLL/S
REGSVR32 JSCRIPT. DLL/S
REGSVR32 MSXML3. DLL/S
4. in Notepad, on the file menu, click Save as.
5. in the file type list, click all files.
6. in the file name box, type register.bat.
7. save the Register.bat file to your desktop.
8 right-click the Register.bat file, and then click Run as administrator. If you are prompted for an administrator password or a confirmation, type the password or click on continue.
9. try to reinstall updates.http://support.Microsoft.com/kb/958053
See: method 1: save the Windows Update fileshttp://support.Microsoft.com/kb/326253
Method 5: Registry Windows Update engine fileshttp://support.Microsoft.com/kb/971058
How to reset the Windows Update components?Method 2: Download and install Windows Update agent
Windows Update Agent
How to get the latest version of the Windows Update Agent to help manage updates on a computer
http://support.Microsoft.com/kb/949104Information for network administrators about how to obtain the latest Windows Update Agent
http://support.Microsoft.com/kb/946928Click Start, click run, click Browse, navigate to the file you saved and click Open.
Add the switch /wuforce at the end of the command run and then click OK. For example, the command run might look like this: "C:\WindowsUpdateAgent30-x86.exe" /wuforce
Click run.
Follow the steps to complete the wizard.
Important
To reinstall Windows Update Agent - download the relevant file from one of the links provided above and save it to a drive where Vista is not loaded because the file cannot be launched directly from the root directory of the system.
Click Start, run, type: "D:\WindowsUpdateAgent30-x86.exe /wuforce" (without the quotes) and press ENTER to install the Windows Update engine.
Note: There is a space between "D:\WindowsUpdateAgent30-x86.exe" and "/ wuforce.
D: is the drive where Windows is not installed (IE a flash drive or a 2nd hard drive etc.)
TaurArian [MVP] 2005-2010 - Update Services
-
I'm trying to upgrade to service pack 3 for xp and I get an error message and it will not complete the installation. What should I do?
Hi BartlettNYC,
Please see the links below, to solve the problems with Window XP SP3.
Steps to take before you install Windows XP SP3.
http://support.Microsoft.com/kb/950717
How to troubleshoot a windows XP SP3 Installation failure.
http://support.Microsoft.com/kb/950718
Good luck.
-
I get the windows login screen and I do not know the password for administrators
I accidentally deleted my account and when the computer starts and I get the windows login screen and I do not know the administrators password. Also how can I reinstall windows when I got a disc when I brought my laptop. Thank you, Lorraine
Thanks for getting back to me. I sold my old laptop to my son-in-law, and he asked me to remove my name from the computer off so that my name wasn't on the screen all the time. so I deleted the profile of cook of lorraine and made one for him, but I didn't give it a password. then I realized what I had to do (I got Lorraine where time is on the bottom of the screen), but was unable to highlight to remove it without a mouse. so I plugged a mouse, but the computer does not read, then I restarted the computer. When I restarted, all I could get was the windows login screen.
then I typed in the name son-nlaws and they said that he was kidnapped, tyoed in mine and got the same and then typed in Administrator, but did not know the password. I have since reinstalled windows. XP Professional would not install saying a file was missing, so I installed xp family and is working again. He just has to click on what edition it wants to run. Professional XP of course happen just with the display of connection... but it can use again.Thank you once again, Lorraine -
In a new tab (+) window, I get a full screen of the Bing site, and I do not see the gear of NEW CONTROLS TAB.
I tried dragging one bookmark in this window and then had this site full-screen. But when I exit Firefox and restart it, it is by default to the Site of Bing - I HATE BING
I do not see the gear for new tab controls, and so I can't put it: 'display your top sites '.
I uninstalled Firefox and installed the latest version - I found myself with the same thing, I had - including my homepage and exactly the same problem - your help would be appreciatedWhat do you see on the page, just nothing?
Could you come back: config, filter using newtab again once and if browser.newtab.url is bold claims to be 'set of users", right click and click Reset in the menu bit
If you open a new tab, which solve this problem?
Edit: sorry for typo's fault: browser.newtab.url
-
I'm doing iPhoto my screen saver and I am not given the choice, when I click on "Source". iPhoto is grayed out. How can I make iPhoto my screen saver? I'll just put up my new iMac.
As a guess I think you need to import your iPhoto library in Photos and chose the photo library.
-
How do I trouble and get rid of the error Code: rundll32.exe on my MacBook Pro?
How do I trouble and get rid of the error Code: rundll32.exe on my MacBook Pro? The heading reads as follows: of "http://Mac support1. com ". I can't remove it from Safari. It is also IMMEDIATELY said 'call APPLE to 1-844-335-2242 '. I asked that this number. Any help would be greatly appreciated.
Choose force quit from the Apple menu, close Safari and then run it with the SHIFT key is pressed. If the message reappears, disconnect the computer from the Internet and close the tab Popup came.
(138334)
-
Please help im trying to import images from the SD card and get this set up the following files were not imported because it couldn't be read items 1-100
"Could not be read" indicates that the Destination Directory has no WRITE permission in your operating system.
To resolve this problem, you must
- Determine the Destination folder - it's on the right side of your import under Destination dialog box
- Change permissions in your operating system on this particular file have WRITE permission (or switch the destination to one that has the WRITE permission)
-
I have started a project and downloaded some pictures of her. Now when I click on projects opens the gallery page and I do not see the images because the vertical photographs are displayed on the monitor. I tried all layouts different portfolio and it does not change the way my photos appear in the gallery. They are too big! Here is my example. Astriya photography
Thanks for the help!
Place the cursor over an image and a pencil appears on the side. Click on it and you will get the options including one to change the width and alignment. This seems to be the only option currently.
-
Hi, I am trying to confirm my new adobe first cc membership and something is not on the agenda, know it: and he know: "confirm by submitting your order, you agree to pay the total price as indicated." what this means and how can I do?
Thanks, Noa
Hello
This message is just to make sure of the price charged.
Kind regards
Sheena
-
How can I find and get rid of the duplicates
How can I find and get rid of the duplicates
Hi sinkerslider,
I apologize for the long delay. In what app work? Looking for double .jpgs, PSD etc files. ? Also, what device and operating system are you using? Thank you very much!
-Kathleen
-
I want to cancel and get my $$$ back, because the conversion using Adobe export in format PDF to Word does NOT, too many errors and inaccuracies in the Word DOC to use. Please cancel my order AD017941759 as soon as POSSIBLE! Thank you...
You will be eager to start here:
Cancel your subscription or membership. Acrobat, services Cloud of Document PDF
Be well...
-
How can I close the preview in the Adobe Viewer when the LINK on my eMag ist fullscreen? He'll still go to URL and I can not open the preview.
You must change your page design if the link does not occupy the full screen of your content.
Neil
Maybe you are looking for
-
I don't get a password reset confirmation email.
After triple verification of the entered e-mail address I so that the duration and Trash files I do not receive the password reset email link... I am on Windows 7, Version of Pale Moon: 25.2.1 (x 64). Tried to get that resolved on Firefox 36.0.1 - bu
-
e-mail failure to download the converted from Pages to Word documents
Why attachment documents are converted to Pages in Word do not download?
-
"DVD player" BUG (needs updating)
DVD player App version: 5500.66 Build: 5,560 (3) So, the problem is the following. When you create your own bookmarks, I found you can't delete or rename the 'cue/framework', it is a mistake that should be easily resolved. You need to be able to rear
-
DAQmX does not appear in Labview 8.5
Story: Got fed up with Vista and downgraded to XP SP2. Reinstalled Labview, Measurement Studio, then DAQmX 9.4 (downloaded the last of the site NOR). Measurement Studio seems to load DAQmX tasks correctly even though I'm scared to compile in the case
-
compatibility of Nexus 5 with MDR-NC31EM
I have a nexus 5. now I would like to purchace Digital Noise Cancelling Headphones MDR-NC31EM. I know that nexus 5 a 5 pin 3.5 mm jack, but I don't know that it is enabled in kernel or operating system level. so, I would like to confirm if the MDR-NC