I'm trying to create a view of a table that I made of subqueries. I have no problems creating views with other tables but it looks like when I try the CREATE VIEW command below, I get an error. I think its something to do MySQL's capabilities creating views that have nested subqueries in them? Does anyone know how to resolve this issue? Or perhaps optimize my method so I don't have to write subqueries?  I know it is not a privilege/permission issue since I have granted all access to my user and I can create other tables and views just fine.   SELECT YEAR(order_date) AS 'year', MONTH(order_date) AS 'month', SUM(ctc_reported) AS 'ctc_reported', SUM(ctc_detected) AS 'ctc_detected',     SUM(ctc_detected)/SUM(ctc_reported) AS 'detection_percent',     SUM(ck_pos_detected) AS 'ck_pos_detected',     SUM(ck_pos_detected)/SUM(ctc_detected) AS 'ck_pos_percent',     SUM(ck_neg_detected) AS 'ck_neg_detected',     SUM(ck_neg_detected)/SUM(ctc_detected) AS 'ck_neg_percent',     SUM(ck_both_detected) AS 'ck_both_detected',     SUM(ck_both_detected)/SUM(ctc_detected) AS 'ck_both_percent'  FROM (SELECT result_management_report_id,     accession_id,     order_date,     IF(ctc_enumeration_result IN ('DETECTED','NOT DETECTED'), 1, 0) AS 'ctc_reported',     IF(ctc_enumeration_result = 'DETECTED', 1, 0) AS 'ctc_detected',     IF(ck_pos &gt; 0 AND ck_neg IS NULL, 1, 0) AS 'ck_pos_detected',     IF(ck_neg &gt; 0 AND ck_pos IS NULL, 1, 0) AS 'ck_neg_detected',     IF(ck_pos &gt; 0 AND ck_neg &gt; 0, 1, 0) AS 'ck_both_detected'   FROM Biocept_DB.result_management_report WHERE final_reported_date IS NOT NULL ) AS subquery GROUP BY YEAR(order_date), MONTH(order_date) );   Error Code: 1142. ANY command denied to user 'BioceptAnalyst'@'%' for table ''  This is what the table looks like:
In MySQL 5.0 why does the following error occur when trying to create a view with a subquery in the FROM clause?     ERROR 1349 (HY000): View's SELECT contains a subquery in the FROM clause   If this is a limitation of the MySQL engine, then why haven't they implemented this feature yet?  Also, what are some good workarounds for this limitation?  Are there any workarounds that work for any subquery in the FROM clause or are there some queries that can not be expressed without using a subquery in the FROM clause?    An example query (was buried in a comment):  SELECT temp.UserName  FROM (SELECT u1.name as UserName, COUNT(m1.UserFromId) as SentCount        FROM Message m1, User u1        WHERE u1.uid = m1.UserFromId        Group BY u1.name HAVING SentCount &gt; 3 ) as temp
Often in fantasies involving magic casting spells requires a certain physical or mental toll on the caster. I don't recall any mention of spells being physically or mentally taxing in the Harry Potter universe.  Does this mean they can cast an unlimited number of spells in a given day without any negative effect to themselves? Is there a tool to get the lines in one file that are not in another? Is there any tool that can get lines which file A contains, but file B doesn't? I could make a little simple script with, e.g, perl, but if something like that already exists, I'll save my time from now on. There does not exist group $G$ such that Aut$(G)\cong \mathbb{Z}_n$ (for odd $n$) I have a website running in English and Japanese and the default language is Japanese.  What are the advantages of one over the other solution:   Solution 1. When accessing example.com, you will see only Japanese. When accessing example.com/en, you will see only English. Solution 2. When you access example.com, it will redirect you to example.com/ja, where you will see only Japanese. English site is still example.com/en. There's vs There are For example:     There's two options here   or     There are two options here   I hear a lot of people say the first line (or something similar), but isn't that incorrect? Isn't it plural and therefore you should use "there are"? Avoid synchronized(this) in Java? Whenever a question pops up on SO about Java synchronization, some people are very eager to point out that synchronized(this) should be avoided. Instead, they claim, a lock on a private reference is to be preferred.  Some of the given reasons are:    (very popular this one, also has an "accidentally" variant)     Other people, including me, argue that synchronized(this) is an idiom that is used a lot (also in Java libraries), is safe and well understood. It should not be avoided because you have a bug and you don't have a clue of what is going on in your multithreaded program. In other words: if it is applicable, then use it.  I am interested in seeing some real-world examples (no foobar stuff) where avoiding a lock on this is preferable when synchronized(this) would also do the job.  Therefore: should you always avoid synchronized(this) and replace it with a lock on a private reference?      Some further info (updated as answers are given):   we are talking about instance synchronization both implicit (synchronized methods) and explicit form of synchronized(this) are considered if you quote Bloch or other authorities on the subject, don't leave out the parts you don't like (e.g. Effective Java, item on Thread Safety: Typically it is the lock on the instance itself, but there are exceptions.) if you need granularity in your locking other than synchronized(this) provides, then synchronized(this) is not applicable so that's not the issue I have been developing in the windows space with Visual Studio for a while now with work, but I have also been using Ubuntu for a while and am keen to get into some software development for linux.  I should also note. I am not looking for .NET and I am aware of mono. I am also familiar with c++ development and some python, so the language isn't so much relevant as the "all in one" aspect.  I was interested to know if there is a useful all in one code/debug/design(gui) IDE similar to something like Visual Studio but for linux? Simulating group_concat MySQL function in Microsoft SQL Server 2005? I'm trying to migrate a MySQL-based app over to Microsoft SQL Server 2005 (not by choice, but that's life).  In the original app, we used almost entirely ANSI-SQL compliant statements, with one significant exception -- we used MySQL's group_concat function fairly frequently.  group_concat, by the way, does this: given a table of, say, employee names and projects...  SELECT empName, projID FROM project_members;   returns:  ANDY   |  A100 ANDY   |  B391 ANDY   |  X010 TOM    |  A100 TOM    |  A510   ... and here's what you get with group_concat:  SELECT      empName, group_concat(projID SEPARATOR ' / ')  FROM      project_members  GROUP BY      empName;   returns:  ANDY   |  A100 / B391 / X010 TOM    |  A100 / A510   So what I'd like to know is: Is it possible to write, say, a user-defined function in SQL Server which emulates the functionality of group_concat?   I have almost no experience using UDFs, stored procedures, or anything like that, just straight-up SQL, so please err on the side of too much explanation :) I'm training a neural network and the training loss decreases, but the validation loss doesn't, or it decreases much less than what I would expect, based on references or experiments with very similar architectures and data. How can I fix this?    As for question        to which this question is inspired, the question is intentionally left general so that other questions about how to reduce the generalization error of a neural network down to a level which has been proved to be attainable, can be closed as duplicates of this one.  See also dedicated thread on Meta: Why cast an unused function parameter value to void? Collinearity diagnostics problematic only when the interaction term is included Sum of nilpotent and element is a unit in ring? I can't tell where I went wrong, am still a beginner.    Let N be a nilpotent in a commutive ring , let X be any element.   I'll will be showing X + N is a unit .   Assume Y(X+N) =1   Then YX(N^n-1) =  N^n-1   Multiplying both side by  X+N   We get X(N^n-1) =  X(N^n-1)  Thus nilpotent summed with any element gives unit. I just created my new character 2 hours ago and I've reached a town. Sometimes random guards will comment that I look ill, or that I should rest. "You look sick, honey. Do you want to lie down?", isn't uncommon.  Did I unexpectedly get vampirism? I didn't fight any vampires, only a couple of wolves and bandits.  I'm a dark elf, so maybe my race isn't seen much around Skyrim and the remarks are more roleplay than actual illness.  Any ideas? Exporting PDF with Hyperlinked Attributes from ArcMap? I'm using ArcGIS 10.1 and would like to export a map to a pdf, preserving feature's attributes. I would like to be able to identify, for example, a point feature from the map on pdf with its underlying features (essentially hyperlink to a document or URL). I know one can export to such a pdf in ArcMap, with an advanced option of exporting features with attributes. I use Adobe Acrobat Pro v.10, and cannot seem to be able to find a way to bring these attributes up.   Is this possible? When it comes to getting a tenure-track position where one has both a lot of resources and academic freedom to do what one wants to do (so having a tenure-track position in a top university might be more useful because one may get more resources at a top university).   Or in short, when one wants to maximize one's chances of becoming a "top scientist".  There are obviously numerous factors, and "rank/prestige" should not be considered as a factor in itself. That said, the period after one gets a PhD is an extremely important time for building up connections, and those are easier to get at a top university. Why does my Mac OS X 10.6 kernel run in 32-bit mode? I have a MacBook Pro (5,1) with 4GB of memory running 10A432 - but it's running the 32-bit kernel.  Any ideas why it wouldn't be running in 64-bit mode, and how I can get it to do so? In "Winnie the Pooh", Why isn't the Hundred Acre Wood  plural? When I read some of these Winnie the Pooh stories to my kids at night, the place where the story takes place is the Hundred Acre Wood, not Hundred Acre Woods.  Why is that? Is there any example that for cardinal numbers $\kappa &lt; \lambda$, we have $2^\kappa = 2^\lambda$?  My guess is that it only depends on whether GCH holds. Is it true? Sorry for the title, its hard to put the problem into proper words.  Basically, in Firefox or Chrome, I try to navigate to stackoverflow.com.  The request fails and the URL I see in the navigation bar is:  http://d2e24t2jgcnor2.webhostoid.com/Secure/Error?URL=http%3A%2F%2Fstackoverflow.com%2F&amp;ResponseCode=504&amp;user_id=5b5033d3-3543-4b7c-9844-055afde93841&amp;uc=20140915&amp;subid=20140915&amp;source=browsersafeguard-rockettab-spigot&amp;version=1.0.5370.12627&amp;implementation_id=browsersafeguard-rockettab-spigot%20&amp;block_host=False&amp;reg=False&amp;redirectms=True   This looks shady and my internet seems slower lately. I have a few questions:   Why is my request going through this strange URL? Do the query parameters reveal my identity? How can I stop this?   I use my cell phone’s 3G network and tether it to my laptop. How can a list be created, whose items are both    enumerated (a,b,c,d,...)  and allow for setting a description via \item[texthere] ?   Im am using MikTex on Windows.