I'm trying to display just the top two rows in Oracle, however I've not been able to come across anything that works.  I currently have   SELECT BRANCH.BRANCHID, BRANCHNAME, AVG(SESSIONPRICE) FROM BRANCH, SESSIONS WHERE SESSIONS.BRANCHID = BRANCH.BRANCHID GROUP BY BRANCHNAME, BRANCH.BRANCHID ORDER BY AVG(SESSIONPRICE) DESC   Which returns this  B2      A     18.67 B4      B     17.57 B3      C     15.44 B1      D     13.99   However, I only want the top two rows of this table.  How on earth do I do this?
Is there a way to make an Oracle query behave like it contains a MySQL limit clause? In MySQL, I can do this: select *  from sometable order by name limit 20,10  to get the 21st to the 30th rows (skip the first 20, give the next 10). The rows are selected after the order by, so it really starts on the 20th name alphabetically. In Oracle, the only thing people mention is the rownum pseudo-column, but it is evaluated before order by, which means this: select *  from sometable where rownum &lt;= 10 order by name  will return a random set of ten rows ordered by name, which is not usually what I want. It also doesn't allow for specifying an offset.
btrfs with multi devices fails automount in fstab I'm trying to automount btrfs  on 12.04-desktop-amd64. During bootsplash, fstab failed to mount btrfs and asked skip or manually prepare.  On the rootshell, btrfs device scan and mount -a could automount properly. It seems "btrfs device scan" was missing from bootstrap.  Where should I add the line to prepare bootstrap? I read this sentence on an educational website:     Now times have changed and you are ready for situations involving forces in two dimensions.   Shouldn't there be a comma before and, since the subject of the sentence has changed (things vs. you)?      Now times have changed, and you are ready for situations involving forces in two dimensions.   What is the exact comma rule for joining two clauses with and? Example of $\deg(fg)<\deg(f)+\deg(g)$ Let $R$ be an integral domain and $f,g\in R[X_1,...,X_n]$ where $n&gt;1$. What is an example of a pair $f,g$ such that $\deg(fg)&lt;\deg(f)+\deg(g)$?   Moreover, I have proven that the units of $R[X_1,...,X_n]$ are just the units in $R$. (Proof is done inductively) Is it true?  EDIT    Even though the each term in the underlined summation is nonzero, isn't it possible that the summation is 0? Why is this impossible ? Is there a way to force Google Chrome to remember passwords for sites that have autocomplete turned off? Clarification: I am a programmer, but ideally, I'd like a method that I could help regular users implement, too. How to host a single website on multiple servers? I'm planning on releasing an iOS app that downloads video from my server. If hundreds of people on the launch day try to do this, then my website and the services that my server provides will clearly go down. How do you host a website on multiple servers? When someone tries to access my site, how is their request passed to an available server? How do Apple and Google do it? Thanks for your help. How to replace subscript symbols Is $\int_a^b f(x) dx = \int_{f(a)}^{f(b)} f^{-1}(x) dx$? Difference of the \dots* I came to wonder, what is the difference between the following?  \dotsc \dotso   As well as between:  \dotsb \dotsi \dotsm Pugh, "Mathematical Analysis", exercise 2.17:     Assume $f : M \to N$ is a map from one metric space to another which satisfies the following condition: for every convergent sequence $(a_n) \subset M$, the sequence $(f(a_n)) \subset N$ converges. Prove that $f$ is continuous.   (I know that if $f$ commutes with limits then the answer is affirmative, but I can't prove it with that hypothesis). How to use Font as a variable? Mail App keeps popping up in the background in Mac OS Mojave Ellipsis for overflow text in dropdown boxes Understanding DC-DC boost converters I’m currently working on a solar powered boat with a modest sized team of people. For our competition we are only allowed to have 3 12v batteries on board but we are allowed to have up to 52v at any point in our setup. We are hoping to kick up the speed of our outboard motor for the sprint portion of the completion and are looking into using a boost converter for this.   After doing a little research I’m a bit confused about how they fundamentally work. From what I can tell they take in a voltage and current and put out a higher voltage with a lower current with some level of efficiency. But it seems to be independent from the load( in this case the motor) which doesn’t make much sense to me because I thought the current would be determined by whatever my load is. How do loads actually interact with boost converters?( The simpler the better.)  For reference we are using the Saietta 119r motor system and I’m considering using the MPS MPQ3425 boost converter. Initializing C# auto-properties When do we double the consonant before '-ing' affix? My son is learning how to spell. He is doing a good job listening to sounds and working out spelling that way (which doesn't work for many words, but at least a lot of common ones), but although he's gotten the -ing chunk, he frequently misses doubling letters in these words.  Is there a guideline for when the end consonant is doubled? He's working on these sorts of words:        riding   sitting   skating   writing   getting Why can't I just think the spin as rotating? I'm going mad about the problem.  I really don't understand why do electron have 1/2 spin number, why they are not actually spinning.  I can accept that the electrons have their own magnetic field, which is certain, but why do they have $\hbar\sqrt3/2$ of angular momentum, and I don't know what the heck is spin number.  I've read the definition of  and  more than a hundred times but there is no betterment. I've smashed my head in my desk more than a hundred times either.  My question is the title. Why can't I just think the spin as rotating?  What I've saw recently,     electron's hypothetical surface would have to be moving faster than the speed of light in order for it to rotate quickly enough to produce the necessary angular momentum. Visual Studio C# statement collapsing When editing really long code blocks (which should definitely be refactored anyway, but that's beyond the scope of this question), I often long for the ability to collapse statement blocks like one can collapse function blocks.  That is to say, it would be great if the minus icon appeared on the code outline for everything enclosed in braces.  It seems to appear for functions, classes, regions, namespaces, usings, but not for conditional or iterative blocks.  It would be fantastic if I could collapse things like ifs, switches, foreaches, that kind of thing!  Googling into that a bit, I discovered that apparently C++ outlining in VS allows this but C# outlining in VS does not.  I don't really get why.  Even notepad++ will so these collapses if I select the C# formatting, so I don't get why Visual Studio doesn't.  Does anyone know of a VS2008 add-in that will enable this behavior?  Or some sort of hidden setting for it?  Edited to add: inserting regions is of course an option and it did already occur to me, but quite frankly, I shouldn't have to wrap things in a region that are already wrapped in braces... if I was going to edit the existing code, I would just refactor it to have better separation of concern anyway. ("wrapping" with new methods instead of regions ;) Humans don't digest fibre, and nor do any animals, but some creatures have micro-organisms (bacteria, I'm guessing) in their gut which digest fibre for them.  My question is, could humans take some sort of pill and establish our own fibre-digesting colonies in our intestines?  Has this been tried?  Supposing it could be done, would you suppose it would have any negative effects on our health?  (i.e.. would those whose gut digested fibre for them be stuck on a low-fibre diet?).    Purpose of question: just wondering.  It would be cool to be able to eat bark. Check if the application is already installed I have installed a package using snap and I need to modify one of the files but when I try to change its ownership or permissions, I always get the following message:  sudo chmod +x ./my_file.js chmod: changing permissions of '/snap/my_app/my_file.js': Read-only file system   How can I modify files that are installed via snap?