There is customer table:   ---+-------+------------+ id + name  + region     +  ---+-------+------------+   There is also orders table:   ---+--------------+------------+----------+----------------+ id + cusomer_id   + product    +  price   +  amount_total  + ---+--------------+------------+----------+----------------+   If I want to form a list of products, which have ever been bought by every customer, in a line with ';' , I make a request:               SELECT GROUP_CONCAT(orders.product separator ';')              FROM orders             WHERE orders.customer_id = customer.id   Everything work fine, however if I want to add some filters there is an error appear:   SELECT customers.id,        (SELECT GROUP_CONCAT(orders.product separator ';')         FROM orders        WHERE orders.customer_id = customers.id) as products  FROM  customers         WHERE customers.region like 'USA'        AND products not like '%fish%'   Query Error: Error: ER_BAD_FIELD_ERROR: Unknown column 'products' in 'where clause'
I need to use an alias in the WHERE clause, but It keeps telling me that its an unknown column. Is there any way to get around this issue? I need to select records that have a rating higher than x. Rating is calculated as the following alias:  sum(reviews.rev_rating)/count(reviews.rev_id) as avg_rating
How to remove spikes from switching transistor? Cron fails with exit status 127 I am totally new to Linux, servers and websites. I recently set up Apache2, Python, PHP, and MySQL for setting up a LAMP server. I am using Xubuntu 16.04 and PHP 7.0.11. I followed a guide and placed a PHP file named testing.php in it with:  &lt;?php phpinfo(); ?&gt;    It doesn't show anything on localhost/testing.php All it shows is the code itself. In computer science we discuss an abstract machine called a "deterministic finite automaton". The standard initialism for this term is "DFA". This makes sense in the singular usage of the initialism.  However, the pluralization of the word "automaton" is "automata". One speaks of "an automaton" or "many automata". Consequently, it seems intuitive to form an initialism of the phrase "deterministic finite automata" as "DFA".   This does not seem correct, as "DFA" could be either plural or singular. On the other hand, "DFAs" also does not seem correct because it would seem to expand to "deterministic finite automatons", a phrase which no self-respecting computer scientist would ever utter.   This appears to be a duplicate of the question here   But that question was never clearly resolved. What to do? Lightning QuickAction (API) without modal Which is the correct sentence?   The young cow is calf. The young cow is called calf. The young cow called as calf. No help from ?-command How do I fix these M4 macro errors? I am trying to compile  but when I run ./autogen.sh the script terminates with these errors  Checking for required M4 macros...   libtool.m4 not found   glib-gettext.m4 not found   intltool.m4 not found   pkg.m4 not found   gtk-doc.m4 not found   yelp.m4 not found ***Error***: some autoconf macros required to build mate-desktop   were not found in your aclocal path, or some forbidden   macros were found.  Perhaps you need to adjust your   ACLOCAL_FLAGS?   What do I need to do to get rid of these errors? I tired installing the latest versions of inittool, glib, gtk, yelp, etc... but I still get the macros errors. Age limit is too strict Correlation coefficient between a (non-dichotomous) nominal variable and a numeric (interval) or an ordinal variable I've already read all the pages in this site trying to find the answer to my problem but no one seems to be the right one form me...  First I explain you the kind of data I'm working with...  Let's say that I have an array vector with several names of city, one for each of 300 users. I also have another array vector with scores response to a survey of each user or a continuous value for each user.  I would like to know if exist a correlation coefficient that compute the correlation between these two variables so, between a nominal and a numeric/continuous or ordinal variables.  I've searched on the Internet and in some pages they suggest to use the contingency coefficient or Cramer's V or Lambda coefficient or Eta . For each of this measure the just say that they could be applied for such data in which we have a nominal variable and interval or numerical variable. The thing is that searching and searching, trying to understand every one of them, sometime is written or watching the examples that they are reasonable to use them if you have dichotomous nominal variable, except for Cramer's V, other time is not written any requirement for the type of data. A lot of other pages say that is right to apply regression instead, that is right, but I would just simply like to know if there is a coefficient like pearson/spearman for this kind of data.  I also think that is no so properly to use Spearman Correlation coeff since the cities are not sortable.  I have also built the function of Cramer'sV and Eta by myself (I'm working with Matlab) but for Eta they don't talk about any p-value to see if the coefficient is statistically significant...  In the matlabWorks site there is also a nice toolbox that says to compute eta^2 but the kind of input it needs is not understandable.  Is here someone that have done a test like mine? If you need more detail to understand the kind of data I'm using just ask me and I'll try to explain you better. Let $G$ pe a $p$ group. I have to show that         the number of nonnormal subgroups is divisible by $p$       the number of subgroups differs from the number of normal subgroups by a power of $p$.   Are there any theorem that can help me to prove this ? We have discussed the Sylow theorems but I don't know how to apply them - if those are the theorems I need. (Does this theorem also hold for infinite groups $G$ ?) How to capture text from the operating system in a practical and simple way? Sometimes we can't select the text to copy &amp; paste, such as dialog boxes.  Sometimes it's just not practical, such as 100 files inside a folder.  Is there any practical and simple way to capture those text from the system into a text file?  I'd wish to know both in OS X and Windows. Maybe it just can't be done today... Chrome not asking to remember passwords By accident, I recently removed some videos from my phone. I tried to restoring them with Recuva and TuneUp Utilities and the results were "undf" files.  I tried to open with VLC, Media Player Classic and other video players to no avail. Where/how do I find out the codec for these files?   I would really love to be able to watch these videos again. How to edit Parameters for an Object after it is created? Complex number identity by trigonometry Show that $\lvert e^{i\theta} - 1\rvert = 2\lvert\sin(\theta/2)\rvert$ by using the geometry of the triangle with vertices 0, 1, and the midpoint of the line joining 0 and $e^{i\theta}$.  I have been able to show this identity through other means, however I am stuck on how to utilize this particular triangle. Is $\exists x(x=a)$ a valid formula in first order logic with equality? Non-Exchange address in Exchange GAL We just made the switch to Google Apps for part of our domain. We disabled the accounts that are now on Google Apps and mail routes correctly. Our problem is that now we have no way of seeing those users in the Global Address List.  So we have these users in our Active Directory, they have no mailbox on Exchange, and we want to be able to see/search for their addresses in the GAL. Is there any way to do this?  This is Exchange 2007, if that matters. Windows 8.1 missing font files after restart Some days ago I rebooted my windows 8.1 system. After the reboot all my system texts were very cryptic - showing only some strange symbols. After some investigation I discovered that my c:\windows\fonts folder was nearly empty. So I copied the font files from another windows 8.1 installation to the nearly empty folder. As soon as I had copied the files the system texts were readable again.  But after another reboot the problem occured again - the systems font folder was empty again. Does anyone know why windows deletes my font files during a restart? Can I find out the return value before returning while debugging in Visual Studio? Take the following function:  DataTable go() {     return someTableAdapter.getSomeData(); }   When I set a breakpoint in this function, is there a possibility to inspect the returned value? go() is directly coupled to a datagrid in an .aspx page.  The only way to inspect the returned datatable is to use a temporary variable. However, that's a bit inconvenient. Isn't there another way?