I need help selecting data where the date is in the previous 3 months. (note: I'm not asking for the last 3 months i.e. DATEADD(MONTH, -3, GETDATE()) )  The reason I don't want to use the DATEADD method is that this query could be run in the middle of the month and I don't want it to return data leading up til that point
I have a query going that gets data for an ID for the last 3 months.  I need to tweak it so I get the highest value for each of the three months.  I've tried a couple of things with the aggregate function MAX, but I'm not getting anywhere.  I'm trying to get the max value for each of the past months ....  Here's the data from the query, currently sorted by date (asc):   ID      Date               Value 12410   01/03/2017 12:17    0.000178 12410   01/10/2017 11:36    0.000186 12410   01/17/2017 11:27    0.000189 12410   01/24/2017 13:09    0.000182 12410   01/31/2017 10:37    0.000169 12410   02/07/2017 11:03    0.000214 12410   02/14/2017 11:52    0.000176 12410   02/21/2017 10:51    0.000200 12410   02/28/2017 12:29    0.000194 12410   03/07/2017 08:39    0.000206   Here's the query:   select AnalysisID as "ID" , AnalysisDateTime as "Date", AnalysisValue as "Value" from AnalysisValueTbl where AnalysisID = 12410 and DatePart(m, AnalysisDateTime) = DatePart(m, DateAdd(m, -3, getdate())) and DatePart(yyyy, AnalysisDateTime) = DatePart(yyyy, DateAdd(m,-3, getdate())) or AnalysisID = 12410 and DatePart(m, AnalysisDateTime) = DatePart(m, DateAdd(m, -2, getdate())) and DatePart(yyyy, AnalysisDateTime) = DatePart(yyyy, DateAdd(m,-2, getdate())) or AnalysisID = 12410 and DatePart(m, AnalysisDateTime) = DatePart(m, DateAdd(m, -1, getdate())) and DatePart(yyyy, AnalysisDateTime) = DatePart(yyyy, DateAdd(m,-1, getdate())) order by AnalysisValue desc
Gauss's law not making sense If we have a point charge and outside of it we have a non-conducting Gaussian sphere, then Gauss's law says that the net flux should be zero. I agree that the total field lines coming in are equal to the number of field lines coming out, but isn't it true that the magnitude of the electric field at those segments of the sphere where the field is coming in is greater than those where it is coming out? So when we integrate, wouldn't these areas, having a greater electric field, contribute more to the net flux? I don't see why they would cancel each other out. I installed Ubuntu 15.04 on the VM and I have downloaded Eclipse Luna. When I try to install it, this error occurs:      An error has occurred.   See the log file   /home/master/.eclipse/1473617060_linux_gtk_x86_64/configuration/1442224462970.log   Can you help me to fix  it? Thanks Checking my understanding: $1 - 1 + 1 - 1 + 1 - ... = \frac{1}{2}$ I've recently run into a proof that claims that $1 - 1 + 1 - 1 + 1 - 1 ... = \frac{1}{2}$ that proceeds as follows:     Let $S = 1 - 1 + 1 - 1 + 1 - 1 + ...$. Then $$S = 1 - (1 - 1 + 1 - 1 + 1 - 1 ...) = 1 - S$$ Therefore, $2S = 1$, so $S = \frac{1}{2}$. QED   I was under the impression that this sum doesn't converge, and therefore this step of the proof is invalid:     Let $S = 1 - 1 + 1 - 1 + 1 - 1 + ...$   That is, it's not even valid to suppose that the sum is equal to some (implicitly real or complex) number $S$, and therefore the reasoning that follows is meaningless because $S$ doesn't exist and therefore has any properties we want it to have.  Is the reasoning I've given above correct? That is, is it correct for me to claim that the proof fails because $S$ doesn't exist?  (I've heard that there are techniques for evaluating divergent integrals by using complex analysis and Taylor series, so perhaps there's another way to prove that the summation is $\frac{1}{2}$; I just wanted to see whether my reasoning is sufficient to explain why this particular proof is incorrect. If the proof actually is correct, then I stand corrected!)  Thanks! Removing elements with Array.map in JavaScript I would like to filter an array of items by using the map() function. Here is a code snippet:  var filteredItems = items.map(function(item) {     if( ...some condition... )     {         return item;     } });   The problem is that filtered out items still uses space in the array and I would like to completely wipe them out.  Any idea?  EDIT: Thanks, I forgot about filter(), what I wanted is actually a filter() then a map().  EDIT2: Thanks for pointing that map() and filter() are not implemented in all browsers, although my specific code was not intended to run in a browser. When users create a node, they should be redirected to a payment page; if payment is successful, the user can see the node.  Is there any way to achieve this? Does the series $\sum \limits_{n=2}^{\infty }\frac{n^{\log n}}{(\log n)^{n}}$ converge? Book about space alien cats I read a book when I was young, it was about space alien cats. I believe the title was Quzzles, but I really don't know. The book was stolen from me before I was finished. I don't know much else about it. Why no ooVoo on ubuntu? I have installed Ubuntu 14.04 LTS 64-Bit and have a Edimax EW-7811Un wifi adapter. I have tired to get it to work but have no luck.   when I run lsusb command I get:  Bus 001 Device 005: ID 7392:7811 Edimax Technology Co., Ltd EW-7811Un 802.11n Wireless Adapter [Realtek RTL8188CUS]   iwconfig shows that nothing is being read or connected:  eth0      no wireless extensions. lo        no wireless extensions.   I have tired numerous forums and tutorials but cant get it to work, dont know what I am doing wrong.   Can someone give a clear step by step method to get this to work?  uname -r: (Kernel Version)  3.16.0-34-generic Let $T : V \rightarrow V$ be a linear operator. If $T^n = O_V$ for some $n \ge 1$, prove that $I_V + T$ is an isomorphism. I think I'm supposed to prove that both $T$ and $I_V$ are isomorphic, but I'm not sure and even if that's the right way to go, how am I supposed to prove that $I_V$ is isomorphic. Or am I going about this all wrong. Please help. By definition $\aleph_1 = 2 ^{\aleph_0}$. And since $2 &lt; \aleph_0$, then $2^{\aleph_0} = {\aleph_1} \le \aleph_0 ^ {\aleph_0}$. However, I do not know what exactly $\aleph_0 ^ {\aleph_0}$ is or how I could compute it. Let $F$ be a field. Why does $F[x]$ have infinitely many irreducible elements?   For the case F has characteristic 0  Then x-a is irreducible for all a $\in F$ since x satisfies no non-trivial relations in F.  Obviously this argument fails for a finite field since there are only finitely many a to choose from.  So how may I construct irreducible polynomials in a finite field?  I figure it must involve higher powers of x, maybe $x^n-a$ ? Is there an exact command for restarting GNOME Shell in Ubuntu 20.04 corresponding to Alt + F2 + 'r' + Enter? Is there a way to restart GNOME Shell other than by using Alt + F2, R + Enter? With respect to the question, I have gone through , but I didn't get what I was looking for. I am looking for a command which exactly does what Alt + F2, r + Enter do. Please note that I am not willing to do the gnome-shell -- replace command... I did check both the things Alt + F2,r Enter and gnome-shell --replace... There is a lot of difference, I found... Why should the first person pronoun 'I' always be capitalized? How can I load a Python module given its full path? Note that the file can be anywhere in the filesystem, as it is a configuration option. What are the shell's control and redirection operators? Comparing SVM and logistic regression Can someone please give me some intuition as to when to choose either SVM or LR? I want to understand the intuition behind what is the difference between the optimization criteria of learning the hyperplane of the two, where the respective aims are as follows:     SVM: Try to maximize the margin between the closest support vectors LR: Maximize the posterior class probability    Let's consider the linear feature space for both SVM and LR.  Some differences I know of already:   SVM is deterministic (but we can use Platts model for probability score) while LR is probabilistic. For the kernel space, SVM is faster (stores just support vectors) PHP/MYSQL login error? if $a,b,c$ are non zero positive reals prove $$\sum_{cyc}\frac{1}{a^3+b^3+abc} \le \frac{1}{abc}$$ I have used A.M  G.M  inequality as follows:  $$a^3+b^3+c^3 \ge 3abc$$ adding $abc$ both sides we get  $$a^3+b^3+abc \ge 4abc-c^3=c(4ab-c^2)$$ so  $$\frac{1}{a^3+b^3+abc} \le \frac{1}{c(4ab-c^2)}$$ But since $a,b,c$ are positive reals  $$4abc-c^3 &lt; 4abc$$ so  $$\frac{1}{4abc-c^3} \gt \frac{1}{4abc}$$  but i am unable to proceed here Tiny navigation buttons and tags on responsive mobile I know it will be hard for you to tell on desktop because the resolution is so high, but the clickable text in the upper left, the icons on the upper right, and the navigation buttons at the bottom are all tiny. I have to squint to read the tags, I can't reasonably tap any navigation button except for Next without zooming, and selecting the achievements dialog, etc. is all very difficult. It seems to me that this would not be terribly difficult to change, so I am posting this feature request. I'm using a relatively large Samsung phone (Note 8), so I can imagine it would be worse on smaller phones.  Edit: I see from posted images that the responsive design on other phones looks nothing like mine. I'm wondering if it has something to do with the high resolution  where it thinks it is bigger than it is, or it's picking the wrong sizes because it's a tiny bit over some size threshold, in which case this would be a bug.