The setting is simple, I wanted to retrieve all rows from table A that were not present in table B. Because a unique row can be identified using 4 columns, I needed to have a way to write the WHERE statement that it works correctly.   My solution is to concatenate the 4 columns and use that as "one" column/key to do the outer join:  select      *  from        table_A where       filter_condition = 0 and         (column1 || column2 || column3 || column4) not in (             select          A.column1 || A.column2 || A.column3 || A.column4             from            table_A A -- 1618727             inner join      table_B B             on              A.column1 = B.column1              and             A.column2 = B.column2              and             A.column3 = B.column3              and             A.column4 = B.column4             and             filter_condition = 0             )   My question is, is this a good way of doing this or am I doing something fundamentally wrong?   To be clear, the desired result is simply to get back only the rows of table_A that I "lose" due to the INNER JOIN with table_A and table_B.
I've got the following two tables (in MySQL): Phone_book +----+------+--------------+ | id | name | phone_number | +----+------+--------------+ | 1  | John | 111111111111 | +----+------+--------------+ | 2  | Jane | 222222222222 | +----+------+--------------+  Call +----+------+--------------+ | id | date | phone_number | +----+------+--------------+ | 1  | 0945 | 111111111111 | +----+------+--------------+ | 2  | 0950 | 222222222222 | +----+------+--------------+ | 3  | 1045 | 333333333333 | +----+------+--------------+  How do I find out which calls were made by people whose phone_number is not in the Phone_book? The desired output would be: Call +----+------+--------------+ | id | date | phone_number | +----+------+--------------+ | 3  | 1045 | 333333333333 | +----+------+--------------+
Tips for getting really good answers on SO The way the askers write questions is a factor in determining how good the answers we get are. Obviously, if you ask a clear, direct question it is easier for a someone to answer you.  But, sometimes I've done that and my questions have still been overlooked.  I've noticed some question-posting methods that aren't exactly obvious, but do help me get better answers.    Some tricks I've learned...   Even if my question is very complicated, I try to write a short question.  People get turned off by longer questions, probably because they think its not worth their time (relative to other questions with equal reputation potential).  After I get some traffic and votes on my question, and maybe some comments like "Can you post the code?" or "Clarify this..." I might post more, but by then I am already getting attention to my question.  So, in summary, even if I know the answer requires a long question, I don't make it long until I've already gotten people to look at it. I use more generic tags when possible.  People are more likely to have c# and linq as a favorite tag, than MethodCallExpression, and I tend to get more views if I use at least one or two general purpose tags along with my more specific tags. I've noticed that if I give my question the performance tag, then SO heavy-weights like Marc Gravell, Jon Skeet and Eric Lippert are more likely to answer my question (especially if I use it in conjunction with a C# tag).  Since having this realization, if I can think of a way to rephrase my question to sound like it is related to C# performance, I will word it as such and tag it accordingly.   "Be polite. SO Users HATE when people be impatient, rude or impolite." - Benny   So,  Does anyone else have any tips for getting better answers and question-recognition on SO?  I think it would be really helpful if everyone contributed their own observations and techniques here.  P.S. This question is probably too long. I am using different operating systems on different machines on different locations. I am using a USB flash disk to keep my files (source codes etc.).  I am new to Mac OS X and now I realize there are lots of files created with a dot underscore ._ prefix.  Questions  Why are ._ files created?   What are their purpose?   How can I avoid them? How to use itemize in Table environment I want to create a table like the picture below, and i wish to itemize the lamba_1 > lamba_2 > 0 using 'item style', which is the cell of each categories. Can someone help me? Check synchronously if file/directory exists in Node.js Find equation of a plane that passes through point and contains the intersection line of 2 other planes Find equation of a plane that passes through point P $(-1,4,2)$ that contains the intersection line of the planes  $$\begin{align*} 4x-y+z-2&amp;=0\\ 2x+y-2z-3&amp;=0 \end{align*}$$  Attempt: I found the the direction vector of the intersection line by taking the cross product of vectors normal to the known planes. I got $\langle 1,10,6\rangle$. Now, I need to find a vector normal to the plane I am looking for. To do that I need one more point on that plane. So how do I proceed? given that $f$ is an analytic function with real part $u$ is a polynomial in the variable of $x,y$, $z=x+iy$, we need to show $f$ is a polynomial in $z$, I am kind of puzzled to see the problem, first I would like to say:any hint please Quick question: what is the compiler flag to allow g++ to spawn multiple instances of itself in order to compile large projects quicker (for example 4 source files at a time for a multi-core CPU)? Should the weight of downvotes be increased? Render result is completely blank I am new to Stack Exchange. I know there is a lot of discussion sites for Stack Exchange. I would like to know about there were any Stack Exchange site available for discussing and solving personal psychological problems. Can Button[] generate output without using Print[]? How to prove that we are living in a 3+1D world? Is there any scientific experiment that can lead us to conclude we live in 3 spatial dimensions without the premise of the conception of limited dimensions?  Thank you all who helped in the improvement of this question (which was not clear at first).   EDIT:  I know that this can be a little philosophical, but it is also a scientific question.  Let's consider the scenario where the mankind was not ever able to see.  Let's also consider that this limitation could be surpassed thus not limiting us to reach a scientific and technological knowledge "similar" to what we have today.  Would this civilization of blind people reach the conclusion that they are living in a 3D spatial world?  Is the sense of touch enough to reach that conclusion? Is there any scientific experiment that can lead us to that conclusion without the premise of the conception of limited dimensions?  Would it be easier, harder, or just different to reach a conclusion predicted by the M-Theory? (please do not focus only on this last question) I want to write a function that returns the nearest next power of 2 number. For example if my input is 789, the output should be 1024. Is there any way of achieving this without using any loops but just using some bitwise operators? Find the remainder when $45!$ is divided by $47$? Find the remainder when $45!$ is divided by $47$?  My approach I am using Wilson's theorem to solve the problem. I reduced the expression into ($47$-$1$-$1$)!/$47!$=$(47$-$1$)/$47$!-$1$/$47!$=-$1$-$1$=-$2$  Am I right in my approach.Please correct me if I am wrong? Please correct me how to approach towards the problem. How to test whether a file uses CRLF or LF without modifying it? I need to periodically run a command that ensures that some text files are kept in Linux mode. Unfortunately dos2unix always modifies the file, which would mess file's and folder's timestamps and cause unnecessary writes.   The script I write is in Bash, so  I'd prefer answers based on Bash. Vectorization operator Script for modifying file content in specified files I tried searching previous questions but none worked, or I couldn't adapt them to my needs.  I want to write a script that asks for:   folder criteria old string new string   And replace every file in the specified folder and subfolders (and force user to type one) with specific criteria (for example, it must be a ".cue" file), and:   If the file is read-only, disable it. Search for specified old string in the file content and replace it with new string , and save changes in same file. If the file was read-only, enable it again.   I have this code so far, but I don't know what to do in the do part:  @echo off   setLocal enableDELAYedexpansion  :START set "var2=" set /P var2="type folder "  if "%var2%"=="" goto ERROR  set /p old="old string ? " set /p new="new string ? " set /p files="what criteria ? " echo modifying files...  for /r "%var2%" %%v in (%%files) do (  ???  ) pause  goto START  :ERROR echo type something!! goto START Normalizing the final weights vector in the upper bound on the Perceptron's convergence The convergence of the "simple"  says that:  $$k\leqslant \left ( \frac{R\left \| \bar{\theta} \right \|}{\gamma } \right )^{2}$$  where $k$ is the number of iterations (in which the weights are updated), $R$ is the maximum distance of a sample from the origin, $\bar{\theta}$ is the final weights vector, and  $\gamma$ is the smallest distance from $\bar{\theta}$ to a sample (= the margin of hyperplane).  Many books implicitly say that  $\left \| \bar{\theta} \right \|$ is equal to 1. But why do they normalize it ? My laptop was working perfectly yesterday, and now today I can't log in.  At first, I was only getting a black screen. However, after following instructions in some questions here on AskUbuntu, I first reinstalled lightdm, and then I had to change the ownership of the file ~/.Xauthority to be my user name. Now, I get the log in GUI screen.  However, once I enter my username, it flickers and then comes back to the login GUI. It does not matter if I use Gnome, Unity, or Gnome-Flashback.  I don't know why lightdm needed to be reconfigured, or how ~/.Xauthority got changed, but in any case, what is still standing in my way, preventing me from logging in?  Update: I have tried deleting the .Xauthority file, and the .profile files in my home directory. It has not changed anything.  Logging in as guest also fails to work.  The following commands did not work:  mv ~/.config ~/.config.BAK mv ~/.cache ~/.cache.BAK   Inside .xsession-errors in my home directory, it says:  Gdk-CRITICAL: gdk_x11_display_get_xdisplay: assertion 'GDK_IS_DISPLAY (display)' failed "Have you seen her?" or "Did you see her?" I already knew that we use the present perfect for an action in the past with a result now. Consider the following questions:   "I'm looking for Paula. Have you seen her?" "I'm looking for Paula. Did you see her?"   Is there any difference between these two questions for this specific action (verb)? What is the result of "seeing" action which can't be represented by simple past?