Both SQL statements return the same result. So what is the difference when using where clause vs using a having clause? Any idea? select       min(internid), max(internid)  from       v_intern where        trainingterm= 'Fall - September' and trainingyear = '2020' group by      trainingTerm, trainingYear    select       min(internid), max(internid)  from       v_intern group by      trainingTerm, trainingYear  having       trainingterm = 'Fall - September' and trainingyear = '2020'
What is the difference between HAVING and WHERE in an SQL SELECT statement? EDIT: I have marked Steven's answer as the correct one as it contained the key bit of information on the link:  When GROUP BY is not used, HAVING behaves like a WHERE clause  The situation I had seen the WHERE in did not have GROUP BY and is where my confusion started. Of course, until you know this you can't specify it in the question.
How can I convert byte size into a human-readable format in Java? Let's say I'm trying to answer a lot of questions just to up my reputation (even if I generally don't know what I'm talking about).  Then, whenever I get downvoted, I just delete my answer so that nobody sees that I've posted stupid answers, and so I don't lose reputation points.   Is this frowned upon? Do I lose reputation points on downvoted answers if I delete them? Graphics issues after/while installing Ubuntu 16.04/16.10 with NVIDIA graphics I have a question pertaining to the concept of acceleration and it's formula - Both seem to give me different answers.  I was asked:     A train is moving at a velocity of $20\ \mathrm{m/s}$. It hits the breaks and starts slowing down at the rate of $8\ \mathrm{m/s^2}$. How long does it travel before coming to a stop?    $a=-8\ \mathrm{m/s^2}$ $u=20\ \mathrm{m/s}$ $v=0$ $s=?$ (Displacement is asked)   According to the formula of $s= \frac{(v^2-u^2)} {2a}$, answer I got was 25 meters.  BUT!  My concept of acceleration explains me this :    According to my intuition of acceleration and velocity, when  an object is said to be accelerating at $-8\ \mathrm{m/s^2}$, it means that with every passing second, it's velocity will reduce $8\ \mathrm{m/s}$. So,   At 1st second - Velocity = $20\ \mathrm{m/s}$ - It'll travel 20 meters. At 2nd second - $v = 20\ \mathrm{m/s}-8\ \mathrm{m/s}=12\ \mathrm{m/s}$ -  Train travels 12 meters At 3rd, it travels 4 meters. At 4th, it halts.   So total is 20+12+4 = 36 meters. It travels 36 meters before halt.  Where am I going wrong in my conceptual understanding, I really don't understand! What diagnostic plots (and perhaps formal tests) do you find most informative for regressions where the outcome is a count variable?  I'm especially interested in Poisson and negative binomial models, as well as zero-inflated and hurdle counterparts of each. Most of the sources I've found simply plot the residuals vs. fitted values without discussion of what these plots "should" look like.  Wisdom and references greatly appreciated. The back story on why I'm asking this, if it's relevant, is .  Related discussions: Textbook recommendations for self-studying high school math? I'm a high school student who is trying to figure out a complete course of self-study for each year of high school. How can I self-learn grades of math without devoting too much time? This is a complex issue for me, as other students at my competitive high school have tutors and the like. Please recommend textbooks that have detailed explanations and progressive practice problems, for self-study for each area such as:  Algebra  Geometry  Trigonometry and Analytic Algebra  Pre-calculus  BC Calculus  Other people have skipped grades of math due to help from tutors and parents. Can I cover all of geometry and trigonometry in 8 months without going insane and be able to skip a grade? Let $ \sigma(A)$ be the set of all eigenvalues of $A$. Show that $ \sigma(A) = \sigma\left(A^T\right)$ where $A^T$ is the transpose matrix of $A$. Cleaning ‘staining’ off bottom of MacBook screen A couple months ago, I started to see some very small stain spots on the bottom of my MacBook Pro early 2015 screen. It's very annoying to see while I'm using it. When the screen is turned off, I see it as in the picture below. But when it's turned on, I see it as very small water-ish drops. I tried to clean it using water, screen cleaner, and even alcohol, but it didn't go away.  Also that area doesn't feel as smooth as the unaffected area. So, I think it's on the outside of my screen not inside.  Have you ever seen this before? Any suggestions on how to remove it without the need of replacing the whole screen? Microbot Alpha says "All of your minions are considered Microbots."  Does this mean while this card is in play, every single minion in play and in discard and in my hand are considered Microbots?   For every Microbot Fixer in play, does every single minion I have in play now get +1 because they are all microbots? If Microbot Archive is in play, does every single minion I have now cause me to draw a card when destroyed? If I play Microbot Reclaimer, can I shuffle any minions from my discard pile into my deck (by considering them all microbots)?   It looks like this link addresses the first item above:   And it looks like this link addresses the 3rd item, implying that minions in the discard are not minions because they are out of play: I was reviewing the  recently, and it occurred to me that one could allow for only scalar multiplication by the integers and still satisfy all of the requirements of a vector space.   Take for example the set of all ordered pairs of integers. Allow for scalar multiplication over the integers and componentwise vector addition as usual. It seems to me that this is a perfectly well-defined vector space.  The integers do not form a , which begs the question: Is there any reason that the "field" over which a vector space is defined must be a mathematical Field? If so, what is wrong with the vector field I attempted to define above? If not, what are the requirements for the scalars? (For instance, do they have to be a  - Abelian or otherwise?) When I try to sculpt with dyntopo on a sword it creates really weird results while it works just fine on other meshes. Any idea what causes this? "Me and my wife" or "my wife and me" Can you choose which version of a game to play on Steam? Positive integer multiples of an irrational mod 1 are dense I'm not sure how to solve this one. Thank you!  $2.$ For any $\alpha\in \mathbb R$ we define $$\lfloor \alpha \rfloor = \max_{n\in\mathbb Z}\{\,n\mid n\leq \alpha\,\}$$ and $$\alpha\bmod 1 = \alpha - \lfloor \alpha \rfloor$$ Let $\alpha$ be irrational. (a) Given $n\in\mathbb N$ show that $\{\,k\alpha\bmod1\mid k\in\mathbb N\,\}\cap\left[0,\frac{1}{n}\right]\neq\emptyset$ (b) Prove that $\{\,n\alpha\bmod 1\mid n\in\mathbb N\,\}$ is dense in $[0,1]$. Basic buoyancy question: Man in a boat with a stone This comes from a brain teaser but I'm not sure I can solve it:     You are in a rowing boat on a lake. A large heavy rock is also in the boat. You heave the rock overboard. It sinks to the bottom of the lake. What happens to the water level in the lake? Does it rise, fall or stay the same?   I'd say that the water level drops, because when you drop the stone in the lake, the water level rises according to the volume of the stone, BUT the water level decreases by a volume of water weighting the stone's weight, when you take it off the boat.  Is that correct? Shrink exFAT partition Is there any way to shrink an exFAT partition?   The windows disk manager has the "Shrink" option greyed out. Which rationals can be written as the sum of two rational squares? Which rational numbers can be written as the sum of two rational squares?  That is, for which rational numbers $a$, are there rational numbers $x$ and $y$ such that $a = x^2 + y^2$.  It is a famous theorem that if an integer can be written as the sum of two rational squares then it can be written as the sum of two integral squares, and then the solution is the famous one by Fermat, but I didn't find anything about the general case. "Two are better than one" or "Two is better than one"? I just came across the phrase "Two are better than one", but I had always heard it in my head as "Two is better than one". This is partially due to the Boys Like Girls song. Which one of these is actually correct? When should we use "can", "could", "will", "would"? Most people say I wish I could, I wish you would.    Can we use I wish I can, I wish you will?    I'd like to know what the main differences between the usage of can/will and could/would are when wishing.  Is it related to the subjunctive? Because one says “I wish I were”, not “I wish I am”, so are would and could the subjunctive forms of can and will?  Or is it something else entirely? Making 3 points stick on a plane / flag with wind I have a flag I want to waft in the wind. I imported the shape as an SVG from Adobe Illustrator.  I converted the mesh to a curve.  It wouldn't let me make some subdivisons but it still seems to work with the cloth property.    When I press play, you can see the structure of the flag stops.  How can I make those last 3 points intact? Also the fill colour seems to have disappeared, do you know why and how I can bring it back?    Thanks  Steve  File here: